//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension CognitoIdentityProvider {
    // MARK: Enums

    public enum AccountTakeoverEventActionType: String, CustomStringConvertible, Codable {
        case block = "BLOCK"
        case mfaIfConfigured = "MFA_IF_CONFIGURED"
        case mfaRequired = "MFA_REQUIRED"
        case noAction = "NO_ACTION"
        public var description: String { return self.rawValue }
    }

    public enum AdvancedSecurityModeType: String, CustomStringConvertible, Codable {
        case audit = "AUDIT"
        case enforced = "ENFORCED"
        case off = "OFF"
        public var description: String { return self.rawValue }
    }

    public enum AliasAttributeType: String, CustomStringConvertible, Codable {
        case email
        case phoneNumber = "phone_number"
        case preferredUsername = "preferred_username"
        public var description: String { return self.rawValue }
    }

    public enum AttributeDataType: String, CustomStringConvertible, Codable {
        case boolean = "Boolean"
        case datetime = "DateTime"
        case number = "Number"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum AuthFlowType: String, CustomStringConvertible, Codable {
        case adminNoSrpAuth = "ADMIN_NO_SRP_AUTH"
        case adminUserPasswordAuth = "ADMIN_USER_PASSWORD_AUTH"
        case customAuth = "CUSTOM_AUTH"
        case refreshToken = "REFRESH_TOKEN"
        case refreshTokenAuth = "REFRESH_TOKEN_AUTH"
        case userPasswordAuth = "USER_PASSWORD_AUTH"
        case userSrpAuth = "USER_SRP_AUTH"
        public var description: String { return self.rawValue }
    }

    public enum ChallengeName: String, CustomStringConvertible, Codable {
        case mfa = "Mfa"
        case password = "Password"
        public var description: String { return self.rawValue }
    }

    public enum ChallengeNameType: String, CustomStringConvertible, Codable {
        case adminNoSrpAuth = "ADMIN_NO_SRP_AUTH"
        case customChallenge = "CUSTOM_CHALLENGE"
        case devicePasswordVerifier = "DEVICE_PASSWORD_VERIFIER"
        case deviceSrpAuth = "DEVICE_SRP_AUTH"
        case mfaSetup = "MFA_SETUP"
        case newPasswordRequired = "NEW_PASSWORD_REQUIRED"
        case passwordVerifier = "PASSWORD_VERIFIER"
        case selectMfaType = "SELECT_MFA_TYPE"
        case smsMfa = "SMS_MFA"
        case softwareTokenMfa = "SOFTWARE_TOKEN_MFA"
        public var description: String { return self.rawValue }
    }

    public enum ChallengeResponse: String, CustomStringConvertible, Codable {
        case failure = "Failure"
        case success = "Success"
        public var description: String { return self.rawValue }
    }

    public enum CompromisedCredentialsEventActionType: String, CustomStringConvertible, Codable {
        case block = "BLOCK"
        case noAction = "NO_ACTION"
        public var description: String { return self.rawValue }
    }

    public enum CustomEmailSenderLambdaVersionType: String, CustomStringConvertible, Codable {
        case v10 = "V1_0"
        public var description: String { return self.rawValue }
    }

    public enum CustomSMSSenderLambdaVersionType: String, CustomStringConvertible, Codable {
        case v10 = "V1_0"
        public var description: String { return self.rawValue }
    }

    public enum DefaultEmailOptionType: String, CustomStringConvertible, Codable {
        case confirmWithCode = "CONFIRM_WITH_CODE"
        case confirmWithLink = "CONFIRM_WITH_LINK"
        public var description: String { return self.rawValue }
    }

    public enum DeliveryMediumType: String, CustomStringConvertible, Codable {
        case email = "EMAIL"
        case sms = "SMS"
        public var description: String { return self.rawValue }
    }

    public enum DeviceRememberedStatusType: String, CustomStringConvertible, Codable {
        case notRemembered = "not_remembered"
        case remembered
        public var description: String { return self.rawValue }
    }

    public enum DomainStatusType: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum EmailSendingAccountType: String, CustomStringConvertible, Codable {
        case cognitoDefault = "COGNITO_DEFAULT"
        case developer = "DEVELOPER"
        public var description: String { return self.rawValue }
    }

    public enum EventFilterType: String, CustomStringConvertible, Codable {
        case passwordChange = "PASSWORD_CHANGE"
        case signIn = "SIGN_IN"
        case signUp = "SIGN_UP"
        public var description: String { return self.rawValue }
    }

    public enum EventResponseType: String, CustomStringConvertible, Codable {
        case failure = "Failure"
        case success = "Success"
        public var description: String { return self.rawValue }
    }

    public enum EventType: String, CustomStringConvertible, Codable {
        case forgotpassword = "ForgotPassword"
        case signin = "SignIn"
        case signup = "SignUp"
        public var description: String { return self.rawValue }
    }

    public enum ExplicitAuthFlowsType: String, CustomStringConvertible, Codable {
        case adminNoSrpAuth = "ADMIN_NO_SRP_AUTH"
        case allowAdminUserPasswordAuth = "ALLOW_ADMIN_USER_PASSWORD_AUTH"
        case allowCustomAuth = "ALLOW_CUSTOM_AUTH"
        case allowRefreshTokenAuth = "ALLOW_REFRESH_TOKEN_AUTH"
        case allowUserPasswordAuth = "ALLOW_USER_PASSWORD_AUTH"
        case allowUserSrpAuth = "ALLOW_USER_SRP_AUTH"
        case customAuthFlowOnly = "CUSTOM_AUTH_FLOW_ONLY"
        case userPasswordAuth = "USER_PASSWORD_AUTH"
        public var description: String { return self.rawValue }
    }

    public enum FeedbackValueType: String, CustomStringConvertible, Codable {
        case invalid = "Invalid"
        case valid = "Valid"
        public var description: String { return self.rawValue }
    }

    public enum IdentityProviderTypeType: String, CustomStringConvertible, Codable {
        case facebook = "Facebook"
        case google = "Google"
        case loginwithamazon = "LoginWithAmazon"
        case oidc = "OIDC"
        case saml = "SAML"
        case signinwithapple = "SignInWithApple"
        public var description: String { return self.rawValue }
    }

    public enum MessageActionType: String, CustomStringConvertible, Codable {
        case resend = "RESEND"
        case suppress = "SUPPRESS"
        public var description: String { return self.rawValue }
    }

    public enum OAuthFlowType: String, CustomStringConvertible, Codable {
        case clientCredentials = "client_credentials"
        case code
        case implicit
        public var description: String { return self.rawValue }
    }

    public enum PreventUserExistenceErrorTypes: String, CustomStringConvertible, Codable {
        case enabled = "ENABLED"
        case legacy = "LEGACY"
        public var description: String { return self.rawValue }
    }

    public enum RecoveryOptionNameType: String, CustomStringConvertible, Codable {
        case adminOnly = "admin_only"
        case verifiedEmail = "verified_email"
        case verifiedPhoneNumber = "verified_phone_number"
        public var description: String { return self.rawValue }
    }

    public enum RiskDecisionType: String, CustomStringConvertible, Codable {
        case accounttakeover = "AccountTakeover"
        case block = "Block"
        case norisk = "NoRisk"
        public var description: String { return self.rawValue }
    }

    public enum RiskLevelType: String, CustomStringConvertible, Codable {
        case high = "High"
        case low = "Low"
        case medium = "Medium"
        public var description: String { return self.rawValue }
    }

    public enum StatusType: String, CustomStringConvertible, Codable {
        case disabled = "Disabled"
        case enabled = "Enabled"
        public var description: String { return self.rawValue }
    }

    public enum TimeUnitsType: String, CustomStringConvertible, Codable {
        case days
        case hours
        case minutes
        case seconds
        public var description: String { return self.rawValue }
    }

    public enum UserImportJobStatusType: String, CustomStringConvertible, Codable {
        case created = "Created"
        case expired = "Expired"
        case failed = "Failed"
        case inprogress = "InProgress"
        case pending = "Pending"
        case stopped = "Stopped"
        case stopping = "Stopping"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum UserPoolMfaType: String, CustomStringConvertible, Codable {
        case off = "OFF"
        case on = "ON"
        case optional = "OPTIONAL"
        public var description: String { return self.rawValue }
    }

    public enum UserStatusType: String, CustomStringConvertible, Codable {
        case archived = "ARCHIVED"
        case compromised = "COMPROMISED"
        case confirmed = "CONFIRMED"
        case externalProvider = "EXTERNAL_PROVIDER"
        case forceChangePassword = "FORCE_CHANGE_PASSWORD"
        case resetRequired = "RESET_REQUIRED"
        case unconfirmed = "UNCONFIRMED"
        case unknown = "UNKNOWN"
        public var description: String { return self.rawValue }
    }

    public enum UsernameAttributeType: String, CustomStringConvertible, Codable {
        case email
        case phoneNumber = "phone_number"
        public var description: String { return self.rawValue }
    }

    public enum VerifiedAttributeType: String, CustomStringConvertible, Codable {
        case email
        case phoneNumber = "phone_number"
        public var description: String { return self.rawValue }
    }

    public enum VerifySoftwareTokenResponseType: String, CustomStringConvertible, Codable {
        case error = "ERROR"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccountRecoverySettingType: AWSEncodableShape & AWSDecodableShape {
        /// The list of RecoveryOptionTypes.
        public let recoveryMechanisms: [RecoveryOptionType]?

        public init(recoveryMechanisms: [RecoveryOptionType]? = nil) {
            self.recoveryMechanisms = recoveryMechanisms
        }

        public func validate(name: String) throws {
            try self.recoveryMechanisms?.forEach {
                try $0.validate(name: "\(name).recoveryMechanisms[]")
            }
            try self.validate(self.recoveryMechanisms, name: "recoveryMechanisms", parent: name, max: 2)
            try self.validate(self.recoveryMechanisms, name: "recoveryMechanisms", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case recoveryMechanisms = "RecoveryMechanisms"
        }
    }

    public struct AccountTakeoverActionType: AWSEncodableShape & AWSDecodableShape {
        /// The event action.    BLOCK Choosing this action will block the request.    MFA_IF_CONFIGURED Throw MFA challenge if user has configured it, else allow the request.    MFA_REQUIRED Throw MFA challenge if user has configured it, else block the request.    NO_ACTION Allow the user sign-in.
        public let eventAction: AccountTakeoverEventActionType
        /// Flag specifying whether to send a notification.
        public let notify: Bool

        public init(eventAction: AccountTakeoverEventActionType, notify: Bool) {
            self.eventAction = eventAction
            self.notify = notify
        }

        private enum CodingKeys: String, CodingKey {
            case eventAction = "EventAction"
            case notify = "Notify"
        }
    }

    public struct AccountTakeoverActionsType: AWSEncodableShape & AWSDecodableShape {
        /// Action to take for a high risk.
        public let highAction: AccountTakeoverActionType?
        /// Action to take for a low risk.
        public let lowAction: AccountTakeoverActionType?
        /// Action to take for a medium risk.
        public let mediumAction: AccountTakeoverActionType?

        public init(highAction: AccountTakeoverActionType? = nil, lowAction: AccountTakeoverActionType? = nil, mediumAction: AccountTakeoverActionType? = nil) {
            self.highAction = highAction
            self.lowAction = lowAction
            self.mediumAction = mediumAction
        }

        private enum CodingKeys: String, CodingKey {
            case highAction = "HighAction"
            case lowAction = "LowAction"
            case mediumAction = "MediumAction"
        }
    }

    public struct AccountTakeoverRiskConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Account takeover risk configuration actions
        public let actions: AccountTakeoverActionsType
        /// The notify configuration used to construct email notifications.
        public let notifyConfiguration: NotifyConfigurationType?

        public init(actions: AccountTakeoverActionsType, notifyConfiguration: NotifyConfigurationType? = nil) {
            self.actions = actions
            self.notifyConfiguration = notifyConfiguration
        }

        public func validate(name: String) throws {
            try self.notifyConfiguration?.validate(name: "\(name).notifyConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "Actions"
            case notifyConfiguration = "NotifyConfiguration"
        }
    }

    public struct AddCustomAttributesRequest: AWSEncodableShape {
        /// An array of custom attributes, such as Mutable and Name.
        public let customAttributes: [SchemaAttributeType]
        /// The user pool ID for the user pool where you want to add custom attributes.
        public let userPoolId: String

        public init(customAttributes: [SchemaAttributeType], userPoolId: String) {
            self.customAttributes = customAttributes
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.customAttributes.forEach {
                try $0.validate(name: "\(name).customAttributes[]")
            }
            try self.validate(self.customAttributes, name: "customAttributes", parent: name, max: 25)
            try self.validate(self.customAttributes, name: "customAttributes", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case customAttributes = "CustomAttributes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AddCustomAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminAddUserToGroupRequest: AWSEncodableShape {
        /// The group name.
        public let groupName: String
        /// The username for the user.
        public let username: String
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(groupName: String, username: String, userPoolId: String) {
            self.groupName = groupName
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminConfirmSignUpRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  If your user pool configuration includes triggers, the AdminConfirmSignUp API action invokes the AWS Lambda function that is specified for the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. In this payload, the clientMetadata attribute provides the data that you assigned to the ClientMetadata parameter in your AdminConfirmSignUp request. In your function code in AWS Lambda, you can process the ClientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// The user name for which you want to confirm user registration.
        public let username: String
        /// The user pool ID for which you want to confirm user registration.
        public let userPoolId: String

        public init(clientMetadata: [String: String]? = nil, username: String, userPoolId: String) {
            self.clientMetadata = clientMetadata
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminConfirmSignUpResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminCreateUserConfigType: AWSEncodableShape & AWSDecodableShape {
        /// Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.
        public let allowAdminCreateUserOnly: Bool?
        /// The message template to be used for the welcome message to new users. See also Customizing User Invitation Messages.
        public let inviteMessageTemplate: MessageTemplateType?
        /// The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7.   If you set a value for TemporaryPasswordValidityDays in PasswordPolicy, that value will be used and UnusedAccountValidityDays will be deprecated for that user pool.
        public let unusedAccountValidityDays: Int?

        public init(allowAdminCreateUserOnly: Bool? = nil, inviteMessageTemplate: MessageTemplateType? = nil, unusedAccountValidityDays: Int? = nil) {
            self.allowAdminCreateUserOnly = allowAdminCreateUserOnly
            self.inviteMessageTemplate = inviteMessageTemplate
            self.unusedAccountValidityDays = unusedAccountValidityDays
        }

        public func validate(name: String) throws {
            try self.inviteMessageTemplate?.validate(name: "\(name).inviteMessageTemplate")
            try self.validate(self.unusedAccountValidityDays, name: "unusedAccountValidityDays", parent: name, max: 365)
            try self.validate(self.unusedAccountValidityDays, name: "unusedAccountValidityDays", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case allowAdminCreateUserOnly = "AllowAdminCreateUserOnly"
            case inviteMessageTemplate = "InviteMessageTemplate"
            case unusedAccountValidityDays = "UnusedAccountValidityDays"
        }
    }

    public struct AdminCreateUserRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned to the pre sign-up trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminCreateUser request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// Specify "EMAIL" if email will be used to send the welcome message. Specify "SMS" if the phone number will be used. The default value is "SMS". More than one value can be specified.
        public let desiredDeliveryMediums: [DeliveryMediumType]?
        /// This parameter is only used if the phone_number_verified or email_verified attribute is set to True. Otherwise, it is ignored. If this parameter is set to True and the phone number or email address specified in the UserAttributes parameter already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias. If this parameter is set to False, the API throws an AliasExistsException error if the alias already exists. The default value is False.
        public let forceAliasCreation: Bool?
        /// Set to "RESEND" to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to "SUPPRESS" to suppress sending the message. Only one value can be specified.
        public let messageAction: MessageActionType?
        /// The user's temporary password. This password must conform to the password policy that you specified when you created the user pool. The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page along with a new password to be used in all future sign-ins. This parameter is not required. If you do not specify a value, Amazon Cognito generates one for you. The temporary password can only be used until the user account expiration limit that you specified when you created the user pool. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter.
        public let temporaryPassword: String?
        /// An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than Username. However, any attributes that you specify as required (when creating a user pool or in the Attributes tab of the console) must be supplied either by you (in your call to AdminCreateUser) or by the user (when he or she signs up in response to your welcome message). For custom attributes, you must prepend the custom: prefix to the attribute name. To send a message inviting the user to sign up, you must specify the user's email address or phone number. This can be done in your call to AdminCreateUser or in the Users tab of the Amazon Cognito console for managing your user pools. In your call to AdminCreateUser, you can set the email_verified attribute to True, and you can set the phone_number_verified attribute to True. (You can also do this by calling AdminUpdateUserAttributes.)    email: The email address of the user to whom the message that contains the code and username will be sent. Required if the email_verified attribute is set to True, or if "EMAIL" is specified in the DesiredDeliveryMediums parameter.    phone_number: The phone number of the user to whom the message that contains the code and username will be sent. Required if the phone_number_verified attribute is set to True, or if "SMS" is specified in the DesiredDeliveryMediums parameter.
        public let userAttributes: [AttributeType]?
        /// The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.
        public let username: String
        /// The user pool ID for the user pool where the user will be created.
        public let userPoolId: String
        /// The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. For example, you might choose to allow or disallow user sign-up based on the user's domain. To configure custom validation, you must create a Pre Sign-up Lambda trigger for the user pool as described in the Amazon Cognito Developer Guide. The Lambda trigger receives the validation data and uses it in the validation process. The user's validation data is not persisted.
        public let validationData: [AttributeType]?

        public init(clientMetadata: [String: String]? = nil, desiredDeliveryMediums: [DeliveryMediumType]? = nil, forceAliasCreation: Bool? = nil, messageAction: MessageActionType? = nil, temporaryPassword: String? = nil, userAttributes: [AttributeType]? = nil, username: String, userPoolId: String, validationData: [AttributeType]? = nil) {
            self.clientMetadata = clientMetadata
            self.desiredDeliveryMediums = desiredDeliveryMediums
            self.forceAliasCreation = forceAliasCreation
            self.messageAction = messageAction
            self.temporaryPassword = temporaryPassword
            self.userAttributes = userAttributes
            self.username = username
            self.userPoolId = userPoolId
            self.validationData = validationData
        }

        public func validate(name: String) throws {
            try self.validate(self.temporaryPassword, name: "temporaryPassword", parent: name, max: 256)
            try self.validate(self.temporaryPassword, name: "temporaryPassword", parent: name, min: 6)
            try self.validate(self.temporaryPassword, name: "temporaryPassword", parent: name, pattern: "[\\S]+")
            try self.userAttributes?.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
            try self.validationData?.forEach {
                try $0.validate(name: "\(name).validationData[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case desiredDeliveryMediums = "DesiredDeliveryMediums"
            case forceAliasCreation = "ForceAliasCreation"
            case messageAction = "MessageAction"
            case temporaryPassword = "TemporaryPassword"
            case userAttributes = "UserAttributes"
            case username = "Username"
            case userPoolId = "UserPoolId"
            case validationData = "ValidationData"
        }
    }

    public struct AdminCreateUserResponse: AWSDecodableShape {
        /// The newly created user.
        public let user: UserType?

        public init(user: UserType? = nil) {
            self.user = user
        }

        private enum CodingKeys: String, CodingKey {
            case user = "User"
        }
    }

    public struct AdminDeleteUserAttributesRequest: AWSEncodableShape {
        /// An array of strings representing the user attribute names you wish to delete. For custom attributes, you must prepend the custom: prefix to the attribute name.
        public let userAttributeNames: [String]
        /// The user name of the user from which you would like to delete attributes.
        public let username: String
        /// The user pool ID for the user pool where you want to delete user attributes.
        public let userPoolId: String

        public init(userAttributeNames: [String], username: String, userPoolId: String) {
            self.userAttributeNames = userAttributeNames
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.userAttributeNames.forEach {
                try validate($0, name: "userAttributeNames[]", parent: name, max: 32)
                try validate($0, name: "userAttributeNames[]", parent: name, min: 1)
                try validate($0, name: "userAttributeNames[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case userAttributeNames = "UserAttributeNames"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDeleteUserAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminDeleteUserRequest: AWSEncodableShape {
        /// The user name of the user you wish to delete.
        public let username: String
        /// The user pool ID for the user pool where you want to delete the user.
        public let userPoolId: String

        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDisableProviderForUserRequest: AWSEncodableShape {
        /// The user to be disabled.
        public let user: ProviderUserIdentifierType
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(user: ProviderUserIdentifierType, userPoolId: String) {
            self.user = user
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.user.validate(name: "\(name).user")
        }

        private enum CodingKeys: String, CodingKey {
            case user = "User"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDisableProviderForUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminDisableUserRequest: AWSEncodableShape {
        /// The user name of the user you wish to disable.
        public let username: String
        /// The user pool ID for the user pool where you want to disable the user.
        public let userPoolId: String

        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDisableUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminEnableUserRequest: AWSEncodableShape {
        /// The user name of the user you wish to enable.
        public let username: String
        /// The user pool ID for the user pool where you want to enable the user.
        public let userPoolId: String

        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminEnableUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminForgetDeviceRequest: AWSEncodableShape {
        /// The device key.
        public let deviceKey: String
        /// The user name.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(deviceKey: String, username: String, userPoolId: String) {
            self.deviceKey = deviceKey
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "[\\w-]+_[0-9a-f-]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case deviceKey = "DeviceKey"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminGetDeviceRequest: AWSEncodableShape {
        /// The device key.
        public let deviceKey: String
        /// The user name.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(deviceKey: String, username: String, userPoolId: String) {
            self.deviceKey = deviceKey
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "[\\w-]+_[0-9a-f-]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case deviceKey = "DeviceKey"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminGetDeviceResponse: AWSDecodableShape {
        /// The device.
        public let device: DeviceType

        public init(device: DeviceType) {
            self.device = device
        }

        private enum CodingKeys: String, CodingKey {
            case device = "Device"
        }
    }

    public struct AdminGetUserRequest: AWSEncodableShape {
        /// The user name of the user you wish to retrieve.
        public let username: String
        /// The user pool ID for the user pool where you want to get information about the user.
        public let userPoolId: String

        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminGetUserResponse: AWSDecodableShape {
        /// Indicates that the status is enabled.
        public let enabled: Bool?
        ///  This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about TOTP software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.
        public let mFAOptions: [MFAOptionType]?
        /// The user's preferred MFA setting.
        public let preferredMfaSetting: String?
        /// An array of name-value pairs representing user attributes.
        public let userAttributes: [AttributeType]?
        /// The date the user was created.
        public let userCreateDate: Date?
        /// The date the user was last modified.
        public let userLastModifiedDate: Date?
        /// The MFA options that are enabled for the user. The possible values in this list are SMS_MFA and SOFTWARE_TOKEN_MFA.
        public let userMFASettingList: [String]?
        /// The user name of the user about whom you are receiving information.
        public let username: String
        /// The user status. Can be one of the following:   UNCONFIRMED - User has been created but not confirmed.   CONFIRMED - User has been confirmed.   ARCHIVED - User is no longer active.   COMPROMISED - User is disabled due to a potential security threat.   UNKNOWN - User status is not known.   RESET_REQUIRED - User is confirmed, but the user must request a code and reset his or her password before he or she can sign in.   FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change his or her password to a new value before doing anything else.
        public let userStatus: UserStatusType?

        public init(enabled: Bool? = nil, mFAOptions: [MFAOptionType]? = nil, preferredMfaSetting: String? = nil, userAttributes: [AttributeType]? = nil, userCreateDate: Date? = nil, userLastModifiedDate: Date? = nil, userMFASettingList: [String]? = nil, username: String, userStatus: UserStatusType? = nil) {
            self.enabled = enabled
            self.mFAOptions = mFAOptions
            self.preferredMfaSetting = preferredMfaSetting
            self.userAttributes = userAttributes
            self.userCreateDate = userCreateDate
            self.userLastModifiedDate = userLastModifiedDate
            self.userMFASettingList = userMFASettingList
            self.username = username
            self.userStatus = userStatus
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case mFAOptions = "MFAOptions"
            case preferredMfaSetting = "PreferredMfaSetting"
            case userAttributes = "UserAttributes"
            case userCreateDate = "UserCreateDate"
            case userLastModifiedDate = "UserLastModifiedDate"
            case userMFASettingList = "UserMFASettingList"
            case username = "Username"
            case userStatus = "UserStatus"
        }
    }

    public struct AdminInitiateAuthRequest: AWSEncodableShape {
        /// The analytics metadata for collecting Amazon Pinpoint metrics for AdminInitiateAuth calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The authentication flow for this call to execute. The API action will depend on this value. For example:    REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.    USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.    USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.   Valid values include:    USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.    REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.    CUSTOM_AUTH: Custom authentication flow.    ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the USERNAME and PASSWORD directly if the flow is enabled for calling the app client.    USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.     ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. This replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, Cognito receives the password in the request instead of using the SRP process to verify passwords.
        public let authFlow: AuthFlowType
        /// The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:   For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.   For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.   For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), PASSWORD (required), DEVICE_KEY.   For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY. To start the authentication flow with password verification, include ChallengeName: SRP_A and SRP_A: (The SRP_A Value).
        public let authParameters: [String: String]?
        /// The app client ID.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers. You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminInitiateAuth API action, Amazon Cognito invokes the AWS Lambda functions that are specified for various triggers. The ClientMetadata value is passed as input to the functions for only the following triggers:   Pre signup   Pre authentication   User migration   When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which the function receives as input. This payload contains a validationData attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminInitiateAuth request. In your function code in AWS Lambda, you can process the validationData value to enhance your workflow for your specific needs. When you use the AdminInitiateAuth API action, Amazon Cognito also invokes the functions for the following triggers, but it does not provide the ClientMetadata value as input:   Post authentication   Custom message   Pre token generation   Create auth challenge   Define auth challenge   Verify auth challenge   For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let contextData: ContextDataType?
        /// The ID of the Amazon Cognito user pool.
        public let userPoolId: String

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, authFlow: AuthFlowType, authParameters: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, contextData: ContextDataType? = nil, userPoolId: String) {
            self.analyticsMetadata = analyticsMetadata
            self.authFlow = authFlow
            self.authParameters = authParameters
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.contextData = contextData
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case authFlow = "AuthFlow"
            case authParameters = "AuthParameters"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case contextData = "ContextData"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminInitiateAuthResponse: AWSDecodableShape {
        /// The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.
        public let authenticationResult: AuthenticationResultType?
        /// The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge.    MFA_SETUP: If MFA is required, users who do not have at least one of the MFA methods set up are presented with an MFA_SETUP challenge. The user must set up at least one MFA type to continue to authenticate.    SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are SMS_MFA for text SMS MFA, and SOFTWARE_TOKEN_MFA for TOTP software token MFA.    SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.    PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.    DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.    DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.    ADMIN_NO_SRP_AUTH: This is returned if you need to authenticate with USERNAME and PASSWORD directly. An app client must be enabled to use this flow.    NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.
        public let challengeName: ChallengeNameType?
        /// The challenge parameters. These are returned to you in the AdminInitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (AdminRespondToAuthChallenge). All challenges require USERNAME and SECRET_HASH (if applicable). The value of the USER_ID_FOR_SRP attribute will be the user's actual username, not an alias (such as email address or phone number), even if you specified an alias in your call to AdminInitiateAuth. This is because, in the AdminRespondToAuthChallenge API ChallengeResponses, the USERNAME attribute cannot be an alias.
        public let challengeParameters: [String: String]?
        /// The session which should be passed both ways in challenge-response calls to the service. If AdminInitiateAuth or AdminRespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next AdminRespondToAuthChallenge API call.
        public let session: String?

        public init(authenticationResult: AuthenticationResultType? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct AdminLinkProviderForUserRequest: AWSEncodableShape {
        /// The existing user in the user pool to be linked to the external identity provider user account. Can be a native (Username + Password) Cognito User Pools user or a federated user (for example, a SAML or Facebook user). If the user doesn't exist, an exception is thrown. This is the user that is returned when the new user (with the linked identity provider attribute) signs in. For a native username + password user, the ProviderAttributeValue for the DestinationUser should be the username in the user pool. For a federated user, it should be the provider-specific user_id. The ProviderAttributeName of the DestinationUser is ignored. The ProviderName should be set to Cognito for users in Cognito user pools.
        public let destinationUser: ProviderUserIdentifierType
        /// An external identity provider account for a user who does not currently exist yet in the user pool. This user must be a federated user (for example, a SAML or Facebook user), not another native user. If the SourceUser is a federated social identity provider user (Facebook, Google, or Login with Amazon), you must set the ProviderAttributeName to Cognito_Subject. For social identity providers, the ProviderName will be Facebook, Google, or LoginWithAmazon, and Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, respectively. The ProviderAttributeValue for the user must be the same value as the id, sub, or user_id value found in the social identity provider token.  For SAML, the ProviderAttributeName can be any value that matches a claim in the SAML assertion. If you wish to link SAML users based on the subject of the SAML assertion, you should map the subject to a claim through the SAML identity provider and submit that claim name as the ProviderAttributeName. If you set ProviderAttributeName to Cognito_Subject, Cognito will automatically parse the default unique identifier found in the subject from the SAML token.
        public let sourceUser: ProviderUserIdentifierType
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(destinationUser: ProviderUserIdentifierType, sourceUser: ProviderUserIdentifierType, userPoolId: String) {
            self.destinationUser = destinationUser
            self.sourceUser = sourceUser
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.destinationUser.validate(name: "\(name).destinationUser")
            try self.sourceUser.validate(name: "\(name).sourceUser")
        }

        private enum CodingKeys: String, CodingKey {
            case destinationUser = "DestinationUser"
            case sourceUser = "SourceUser"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminLinkProviderForUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminListDevicesRequest: AWSEncodableShape {
        /// The limit of the devices request.
        public let limit: Int?
        /// The pagination token.
        public let paginationToken: String?
        /// The user name.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(limit: Int? = nil, paginationToken: String? = nil, username: String, userPoolId: String) {
            self.limit = limit
            self.paginationToken = paginationToken
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case paginationToken = "PaginationToken"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminListDevicesResponse: AWSDecodableShape {
        /// The devices in the list of devices response.
        public let devices: [DeviceType]?
        /// The pagination token.
        public let paginationToken: String?

        public init(devices: [DeviceType]? = nil, paginationToken: String? = nil) {
            self.devices = devices
            self.paginationToken = paginationToken
        }

        private enum CodingKeys: String, CodingKey {
            case devices = "Devices"
            case paginationToken = "PaginationToken"
        }
    }

    public struct AdminListGroupsForUserRequest: AWSEncodableShape {
        /// The limit of the request to list groups.
        public let limit: Int?
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?
        /// The username for the user.
        public let username: String
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(limit: Int? = nil, nextToken: String? = nil, username: String, userPoolId: String) {
            self.limit = limit
            self.nextToken = nextToken
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextToken = "NextToken"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminListGroupsForUserResponse: AWSDecodableShape {
        /// The groups that the user belongs to.
        public let groups: [GroupType]?
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?

        public init(groups: [GroupType]? = nil, nextToken: String? = nil) {
            self.groups = groups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groups = "Groups"
            case nextToken = "NextToken"
        }
    }

    public struct AdminListUserAuthEventsRequest: AWSEncodableShape {
        /// The maximum number of authentication events to return.
        public let maxResults: Int?
        /// A pagination token.
        public let nextToken: String?
        /// The user pool username or an alias.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, username: String, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminListUserAuthEventsResponse: AWSDecodableShape {
        /// The response object. It includes the EventID, EventType, CreationDate, EventRisk, and EventResponse.
        public let authEvents: [AuthEventType]?
        /// A pagination token.
        public let nextToken: String?

        public init(authEvents: [AuthEventType]? = nil, nextToken: String? = nil) {
            self.authEvents = authEvents
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case authEvents = "AuthEvents"
            case nextToken = "NextToken"
        }
    }

    public struct AdminRemoveUserFromGroupRequest: AWSEncodableShape {
        /// The group name.
        public let groupName: String
        /// The username for the user.
        public let username: String
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(groupName: String, username: String, userPoolId: String) {
            self.groupName = groupName
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminResetUserPasswordRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminResetUserPassword API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminResetUserPassword request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// The user name of the user whose password you wish to reset.
        public let username: String
        /// The user pool ID for the user pool where you want to reset the user's password.
        public let userPoolId: String

        public init(clientMetadata: [String: String]? = nil, username: String, userPoolId: String) {
            self.clientMetadata = clientMetadata
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminResetUserPasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminRespondToAuthChallengeRequest: AWSEncodableShape {
        /// The analytics metadata for collecting Amazon Pinpoint metrics for AdminRespondToAuthChallenge calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The challenge name. For more information, see AdminInitiateAuth.
        public let challengeName: ChallengeNameType
        /// The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:    SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured with client secret).    PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client secret).    ADMIN_NO_SRP_AUTH: PASSWORD, USERNAME, SECRET_HASH (if app client is configured with client secret).     NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME, SECRET_HASH (if app client is configured with client secret).    The value of the USERNAME attribute must be the user's actual username, not an alias (such as email address or phone number). To make this easier, the AdminInitiateAuth response includes the actual username value in the USERNAMEUSER_ID_FOR_SRP attribute, even if you specified an alias in your call to AdminInitiateAuth.
        public let challengeResponses: [String: String]?
        /// The app client ID.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminRespondToAuthChallenge API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, post authentication, user migration, pre token generation, define auth challenge, create auth challenge, and verify auth challenge response. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminRespondToAuthChallenge request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let contextData: ContextDataType?
        /// The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.
        public let session: String?
        /// The ID of the Amazon Cognito user pool.
        public let userPoolId: String

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, challengeName: ChallengeNameType, challengeResponses: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, contextData: ContextDataType? = nil, session: String? = nil, userPoolId: String) {
            self.analyticsMetadata = analyticsMetadata
            self.challengeName = challengeName
            self.challengeResponses = challengeResponses
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.contextData = contextData
            self.session = session
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case challengeName = "ChallengeName"
            case challengeResponses = "ChallengeResponses"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case contextData = "ContextData"
            case session = "Session"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminRespondToAuthChallengeResponse: AWSDecodableShape {
        /// The result returned by the server in response to the authentication request.
        public let authenticationResult: AuthenticationResultType?
        /// The name of the challenge. For more information, see AdminInitiateAuth.
        public let challengeName: ChallengeNameType?
        /// The challenge parameters. For more information, see AdminInitiateAuth.
        public let challengeParameters: [String: String]?
        /// The session which should be passed both ways in challenge-response calls to the service. If the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.
        public let session: String?

        public init(authenticationResult: AuthenticationResultType? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct AdminSetUserMFAPreferenceRequest: AWSEncodableShape {
        /// The SMS text message MFA settings.
        public let sMSMfaSettings: SMSMfaSettingsType?
        /// The time-based one-time password software token MFA settings.
        public let softwareTokenMfaSettings: SoftwareTokenMfaSettingsType?
        /// The user pool username or alias.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(sMSMfaSettings: SMSMfaSettingsType? = nil, softwareTokenMfaSettings: SoftwareTokenMfaSettingsType? = nil, username: String, userPoolId: String) {
            self.sMSMfaSettings = sMSMfaSettings
            self.softwareTokenMfaSettings = softwareTokenMfaSettings
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case sMSMfaSettings = "SMSMfaSettings"
            case softwareTokenMfaSettings = "SoftwareTokenMfaSettings"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminSetUserMFAPreferenceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminSetUserPasswordRequest: AWSEncodableShape {
        /// The password for the user.
        public let password: String
        ///  True if the password is permanent, False if it is temporary.
        public let permanent: Bool?
        /// The user name of the user whose password you wish to set.
        public let username: String
        /// The user pool ID for the user pool where you want to set the user's password.
        public let userPoolId: String

        public init(password: String, permanent: Bool? = nil, username: String, userPoolId: String) {
            self.password = password
            self.permanent = permanent
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.password, name: "password", parent: name, max: 256)
            try self.validate(self.password, name: "password", parent: name, min: 6)
            try self.validate(self.password, name: "password", parent: name, pattern: "[\\S]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case password = "Password"
            case permanent = "Permanent"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminSetUserPasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminSetUserSettingsRequest: AWSEncodableShape {
        /// You can use this parameter only to set an SMS configuration that uses SMS for delivery.
        public let mFAOptions: [MFAOptionType]
        /// The user name of the user that you are setting options for.
        public let username: String
        /// The ID of the user pool that contains the user that you are setting options for.
        public let userPoolId: String

        public init(mFAOptions: [MFAOptionType], username: String, userPoolId: String) {
            self.mFAOptions = mFAOptions
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.mFAOptions.forEach {
                try $0.validate(name: "\(name).mFAOptions[]")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case mFAOptions = "MFAOptions"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminSetUserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUpdateAuthEventFeedbackRequest: AWSEncodableShape {
        /// The authentication event ID.
        public let eventId: String
        /// The authentication event feedback value.
        public let feedbackValue: FeedbackValueType
        /// The user pool username.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(eventId: String, feedbackValue: FeedbackValueType, username: String, userPoolId: String) {
            self.eventId = eventId
            self.feedbackValue = feedbackValue
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.eventId, name: "eventId", parent: name, max: 50)
            try self.validate(self.eventId, name: "eventId", parent: name, min: 1)
            try self.validate(self.eventId, name: "eventId", parent: name, pattern: "[\\w+-]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case eventId = "EventId"
            case feedbackValue = "FeedbackValue"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUpdateAuthEventFeedbackResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUpdateDeviceStatusRequest: AWSEncodableShape {
        /// The device key.
        public let deviceKey: String
        /// The status indicating whether a device has been remembered or not.
        public let deviceRememberedStatus: DeviceRememberedStatusType?
        /// The user name.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(deviceKey: String, deviceRememberedStatus: DeviceRememberedStatusType? = nil, username: String, userPoolId: String) {
            self.deviceKey = deviceKey
            self.deviceRememberedStatus = deviceRememberedStatus
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "[\\w-]+_[0-9a-f-]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case deviceKey = "DeviceKey"
            case deviceRememberedStatus = "DeviceRememberedStatus"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUpdateDeviceStatusResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUpdateUserAttributesRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminUpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminUpdateUserAttributes request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// An array of name-value pairs representing user attributes. For custom attributes, you must prepend the custom: prefix to the attribute name.
        public let userAttributes: [AttributeType]
        /// The user name of the user for whom you want to update user attributes.
        public let username: String
        /// The user pool ID for the user pool where you want to update user attributes.
        public let userPoolId: String

        public init(clientMetadata: [String: String]? = nil, userAttributes: [AttributeType], username: String, userPoolId: String) {
            self.clientMetadata = clientMetadata
            self.userAttributes = userAttributes
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.userAttributes.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case userAttributes = "UserAttributes"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUpdateUserAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUserGlobalSignOutRequest: AWSEncodableShape {
        /// The user name.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUserGlobalSignOutResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AnalyticsConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an Amazon Pinpoint project. You can use the Amazon Pinpoint project for Pinpoint integration with the chosen User Pool Client. Amazon Cognito publishes events to the pinpoint project declared by the app ARN.
        public let applicationArn: String?
        /// The application ID for an Amazon Pinpoint application.
        public let applicationId: String?
        /// The external ID.
        public let externalId: String?
        /// The ARN of an IAM role that authorizes Amazon Cognito to publish events to Amazon Pinpoint analytics.
        public let roleArn: String?
        /// If UserDataShared is true, Amazon Cognito will include user data in the events it publishes to Amazon Pinpoint analytics.
        public let userDataShared: Bool?

        public init(applicationArn: String? = nil, applicationId: String? = nil, externalId: String? = nil, roleArn: String? = nil, userDataShared: Bool? = nil) {
            self.applicationArn = applicationArn
            self.applicationId = applicationId
            self.externalId = externalId
            self.roleArn = roleArn
            self.userDataShared = userDataShared
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationArn, name: "applicationArn", parent: name, max: 2048)
            try self.validate(self.applicationArn, name: "applicationArn", parent: name, min: 20)
            try self.validate(self.applicationArn, name: "applicationArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[0-9a-fA-F]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn = "ApplicationArn"
            case applicationId = "ApplicationId"
            case externalId = "ExternalId"
            case roleArn = "RoleArn"
            case userDataShared = "UserDataShared"
        }
    }

    public struct AnalyticsMetadataType: AWSEncodableShape {
        /// The endpoint ID.
        public let analyticsEndpointId: String?

        public init(analyticsEndpointId: String? = nil) {
            self.analyticsEndpointId = analyticsEndpointId
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsEndpointId = "AnalyticsEndpointId"
        }
    }

    public struct AssociateSoftwareTokenRequest: AWSEncodableShape {
        /// The access token.
        public let accessToken: String?
        /// The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.
        public let session: String?

        public init(accessToken: String? = nil, session: String? = nil) {
            self.accessToken = accessToken
            self.session = session
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case session = "Session"
        }
    }

    public struct AssociateSoftwareTokenResponse: AWSDecodableShape {
        /// A unique generated shared secret code that is used in the TOTP algorithm to generate a one time code.
        public let secretCode: String?
        /// The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.
        public let session: String?

        public init(secretCode: String? = nil, session: String? = nil) {
            self.secretCode = secretCode
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case secretCode = "SecretCode"
            case session = "Session"
        }
    }

    public struct AttributeType: AWSEncodableShape & AWSDecodableShape {
        /// The name of the attribute.
        public let name: String
        /// The value of the attribute.
        public let value: String?

        public init(name: String, value: String? = nil) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.value, name: "value", parent: name, max: 2048)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct AuthEventType: AWSDecodableShape {
        /// The challenge responses.
        public let challengeResponses: [ChallengeResponseType]?
        /// The creation date
        public let creationDate: Date?
        /// The user context data captured at the time of an event request. It provides additional information about the client from which event the request is received.
        public let eventContextData: EventContextDataType?
        /// A flag specifying the user feedback captured at the time of an event request is good or bad.
        public let eventFeedback: EventFeedbackType?
        /// The event ID.
        public let eventId: String?
        /// The event response.
        public let eventResponse: EventResponseType?
        /// The event risk.
        public let eventRisk: EventRiskType?
        /// The event type.
        public let eventType: EventType?

        public init(challengeResponses: [ChallengeResponseType]? = nil, creationDate: Date? = nil, eventContextData: EventContextDataType? = nil, eventFeedback: EventFeedbackType? = nil, eventId: String? = nil, eventResponse: EventResponseType? = nil, eventRisk: EventRiskType? = nil, eventType: EventType? = nil) {
            self.challengeResponses = challengeResponses
            self.creationDate = creationDate
            self.eventContextData = eventContextData
            self.eventFeedback = eventFeedback
            self.eventId = eventId
            self.eventResponse = eventResponse
            self.eventRisk = eventRisk
            self.eventType = eventType
        }

        private enum CodingKeys: String, CodingKey {
            case challengeResponses = "ChallengeResponses"
            case creationDate = "CreationDate"
            case eventContextData = "EventContextData"
            case eventFeedback = "EventFeedback"
            case eventId = "EventId"
            case eventResponse = "EventResponse"
            case eventRisk = "EventRisk"
            case eventType = "EventType"
        }
    }

    public struct AuthenticationResultType: AWSDecodableShape {
        /// The access token.
        public let accessToken: String?
        /// The expiration period of the authentication result in seconds.
        public let expiresIn: Int?
        /// The ID token.
        public let idToken: String?
        /// The new device metadata from an authentication result.
        public let newDeviceMetadata: NewDeviceMetadataType?
        /// The refresh token.
        public let refreshToken: String?
        /// The token type.
        public let tokenType: String?

        public init(accessToken: String? = nil, expiresIn: Int? = nil, idToken: String? = nil, newDeviceMetadata: NewDeviceMetadataType? = nil, refreshToken: String? = nil, tokenType: String? = nil) {
            self.accessToken = accessToken
            self.expiresIn = expiresIn
            self.idToken = idToken
            self.newDeviceMetadata = newDeviceMetadata
            self.refreshToken = refreshToken
            self.tokenType = tokenType
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case expiresIn = "ExpiresIn"
            case idToken = "IdToken"
            case newDeviceMetadata = "NewDeviceMetadata"
            case refreshToken = "RefreshToken"
            case tokenType = "TokenType"
        }
    }

    public struct ChallengeResponseType: AWSDecodableShape {
        /// The challenge name
        public let challengeName: ChallengeName?
        /// The challenge response.
        public let challengeResponse: ChallengeResponse?

        public init(challengeName: ChallengeName? = nil, challengeResponse: ChallengeResponse? = nil) {
            self.challengeName = challengeName
            self.challengeResponse = challengeResponse
        }

        private enum CodingKeys: String, CodingKey {
            case challengeName = "ChallengeName"
            case challengeResponse = "ChallengeResponse"
        }
    }

    public struct ChangePasswordRequest: AWSEncodableShape {
        /// The access token.
        public let accessToken: String
        /// The old password.
        public let previousPassword: String
        /// The new password.
        public let proposedPassword: String

        public init(accessToken: String, previousPassword: String, proposedPassword: String) {
            self.accessToken = accessToken
            self.previousPassword = previousPassword
            self.proposedPassword = proposedPassword
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.previousPassword, name: "previousPassword", parent: name, max: 256)
            try self.validate(self.previousPassword, name: "previousPassword", parent: name, min: 6)
            try self.validate(self.previousPassword, name: "previousPassword", parent: name, pattern: "[\\S]+")
            try self.validate(self.proposedPassword, name: "proposedPassword", parent: name, max: 256)
            try self.validate(self.proposedPassword, name: "proposedPassword", parent: name, min: 6)
            try self.validate(self.proposedPassword, name: "proposedPassword", parent: name, pattern: "[\\S]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case previousPassword = "PreviousPassword"
            case proposedPassword = "ProposedPassword"
        }
    }

    public struct ChangePasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CodeDeliveryDetailsType: AWSDecodableShape {
        /// The attribute name.
        public let attributeName: String?
        /// The delivery medium (email message or phone number).
        public let deliveryMedium: DeliveryMediumType?
        /// The destination for the code delivery details.
        public let destination: String?

        public init(attributeName: String? = nil, deliveryMedium: DeliveryMediumType? = nil, destination: String? = nil) {
            self.attributeName = attributeName
            self.deliveryMedium = deliveryMedium
            self.destination = destination
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case deliveryMedium = "DeliveryMedium"
            case destination = "Destination"
        }
    }

    public struct CompromisedCredentialsActionsType: AWSEncodableShape & AWSDecodableShape {
        /// The event action.
        public let eventAction: CompromisedCredentialsEventActionType

        public init(eventAction: CompromisedCredentialsEventActionType) {
            self.eventAction = eventAction
        }

        private enum CodingKeys: String, CodingKey {
            case eventAction = "EventAction"
        }
    }

    public struct CompromisedCredentialsRiskConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The compromised credentials risk configuration actions.
        public let actions: CompromisedCredentialsActionsType
        /// Perform the action for these events. The default is to perform all events if no event filter is specified.
        public let eventFilter: [EventFilterType]?

        public init(actions: CompromisedCredentialsActionsType, eventFilter: [EventFilterType]? = nil) {
            self.actions = actions
            self.eventFilter = eventFilter
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "Actions"
            case eventFilter = "EventFilter"
        }
    }

    public struct ConfirmDeviceRequest: AWSEncodableShape {
        /// The access token.
        public let accessToken: String
        /// The device key.
        public let deviceKey: String
        /// The device name.
        public let deviceName: String?
        /// The configuration of the device secret verifier.
        public let deviceSecretVerifierConfig: DeviceSecretVerifierConfigType?

        public init(accessToken: String, deviceKey: String, deviceName: String? = nil, deviceSecretVerifierConfig: DeviceSecretVerifierConfigType? = nil) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
            self.deviceName = deviceName
            self.deviceSecretVerifierConfig = deviceSecretVerifierConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "[\\w-]+_[0-9a-f-]+")
            try self.validate(self.deviceName, name: "deviceName", parent: name, max: 1024)
            try self.validate(self.deviceName, name: "deviceName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
            case deviceName = "DeviceName"
            case deviceSecretVerifierConfig = "DeviceSecretVerifierConfig"
        }
    }

    public struct ConfirmDeviceResponse: AWSDecodableShape {
        /// Indicates whether the user confirmation is necessary to confirm the device response.
        public let userConfirmationNecessary: Bool?

        public init(userConfirmationNecessary: Bool? = nil) {
            self.userConfirmationNecessary = userConfirmationNecessary
        }

        private enum CodingKeys: String, CodingKey {
            case userConfirmationNecessary = "UserConfirmationNecessary"
        }
    }

    public struct ConfirmForgotPasswordRequest: AWSEncodableShape {
        /// The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmForgotPassword calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The app client ID of the app associated with the user pool.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ConfirmForgotPassword API action, Amazon Cognito invokes the function that is assigned to the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ConfirmForgotPassword request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// The confirmation code sent by a user's request to retrieve a forgotten password. For more information, see ForgotPassword.
        public let confirmationCode: String
        /// The password sent by a user's request to retrieve a forgotten password.
        public let password: String
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.
        public let secretHash: String?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let userContextData: UserContextDataType?
        /// The user name of the user for whom you want to enter a code to retrieve a forgotten password.
        public let username: String

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, confirmationCode: String, password: String, secretHash: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.confirmationCode = confirmationCode
            self.password = password
            self.secretHash = secretHash
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, max: 2048)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, min: 1)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, pattern: "[\\S]+")
            try self.validate(self.password, name: "password", parent: name, max: 256)
            try self.validate(self.password, name: "password", parent: name, min: 6)
            try self.validate(self.password, name: "password", parent: name, pattern: "[\\S]+")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "[\\w+=/]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case confirmationCode = "ConfirmationCode"
            case password = "Password"
            case secretHash = "SecretHash"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ConfirmForgotPasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ConfirmSignUpRequest: AWSEncodableShape {
        /// The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmSignUp calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the app client associated with the user pool.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ConfirmSignUp API action, Amazon Cognito invokes the function that is assigned to the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ConfirmSignUp request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// The confirmation code sent by a user's request to confirm registration.
        public let confirmationCode: String
        /// Boolean to be specified to force user confirmation irrespective of existing alias. By default set to False. If this parameter is set to True and the phone number/email used for sign up confirmation already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user being confirmed. If set to False, the API will throw an AliasExistsException error.
        public let forceAliasCreation: Bool?
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.
        public let secretHash: String?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let userContextData: UserContextDataType?
        /// The user name of the user whose registration you wish to confirm.
        public let username: String

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, confirmationCode: String, forceAliasCreation: Bool? = nil, secretHash: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.confirmationCode = confirmationCode
            self.forceAliasCreation = forceAliasCreation
            self.secretHash = secretHash
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, max: 2048)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, min: 1)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, pattern: "[\\S]+")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "[\\w+=/]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case confirmationCode = "ConfirmationCode"
            case forceAliasCreation = "ForceAliasCreation"
            case secretHash = "SecretHash"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ConfirmSignUpResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ContextDataType: AWSEncodableShape {
        /// Encoded data containing device fingerprinting details, collected using the Amazon Cognito context data collection library.
        public let encodedData: String?
        /// HttpHeaders received on your server in same order.
        public let httpHeaders: [HttpHeader]
        /// Source IP address of your user.
        public let ipAddress: String
        /// Your server endpoint where this API is invoked.
        public let serverName: String
        /// Your server path where this API is invoked.
        public let serverPath: String

        public init(encodedData: String? = nil, httpHeaders: [HttpHeader], ipAddress: String, serverName: String, serverPath: String) {
            self.encodedData = encodedData
            self.httpHeaders = httpHeaders
            self.ipAddress = ipAddress
            self.serverName = serverName
            self.serverPath = serverPath
        }

        private enum CodingKeys: String, CodingKey {
            case encodedData = "EncodedData"
            case httpHeaders = "HttpHeaders"
            case ipAddress = "IpAddress"
            case serverName = "ServerName"
            case serverPath = "ServerPath"
        }
    }

    public struct CreateGroupRequest: AWSEncodableShape {
        /// A string containing the description of the group.
        public let description: String?
        /// The name of the group. Must be unique.
        public let groupName: String
        /// A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens. The default Precedence value is null.
        public let precedence: Int?
        /// The role ARN for the group.
        public let roleArn: String?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(description: String? = nil, groupName: String, precedence: Int? = nil, roleArn: String? = nil, userPoolId: String) {
            self.description = description
            self.groupName = groupName
            self.precedence = precedence
            self.roleArn = roleArn
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2048)
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.precedence, name: "precedence", parent: name, min: 0)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case groupName = "GroupName"
            case precedence = "Precedence"
            case roleArn = "RoleArn"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateGroupResponse: AWSDecodableShape {
        /// The group object for the group.
        public let group: GroupType?

        public init(group: GroupType? = nil) {
            self.group = group
        }

        private enum CodingKeys: String, CodingKey {
            case group = "Group"
        }
    }

    public struct CreateIdentityProviderRequest: AWSEncodableShape {
        /// A mapping of identity provider attributes to standard and custom user pool attributes.
        public let attributeMapping: [String: String]?
        /// A list of identity provider identifiers.
        public let idpIdentifiers: [String]?
        /// The identity provider details. The following list describes the provider detail keys for each identity provider type.   For Google and Login with Amazon:   client_id   client_secret   authorize_scopes     For Facebook:   client_id   client_secret   authorize_scopes   api_version     For Sign in with Apple:   client_id   team_id   key_id   private_key   authorize_scopes     For OIDC providers:   client_id   client_secret   attributes_request_method   oidc_issuer   authorize_scopes   authorize_url if not available from discovery URL specified by oidc_issuer key    token_url if not available from discovery URL specified by oidc_issuer key    attributes_url if not available from discovery URL specified by oidc_issuer key    jwks_uri if not available from discovery URL specified by oidc_issuer key      For SAML providers:   MetadataFile OR MetadataURL   IDPSignout optional
        public let providerDetails: [String: String]
        /// The identity provider name.
        public let providerName: String
        /// The identity provider type.
        public let providerType: IdentityProviderTypeType
        /// The user pool ID.
        public let userPoolId: String

        public init(attributeMapping: [String: String]? = nil, idpIdentifiers: [String]? = nil, providerDetails: [String: String], providerName: String, providerType: IdentityProviderTypeType, userPoolId: String) {
            self.attributeMapping = attributeMapping
            self.idpIdentifiers = idpIdentifiers
            self.providerDetails = providerDetails
            self.providerName = providerName
            self.providerType = providerType
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.attributeMapping?.forEach {
                try validate($0.key, name: "attributeMapping.key", parent: name, max: 32)
                try validate($0.key, name: "attributeMapping.key", parent: name, min: 1)
            }
            try self.idpIdentifiers?.forEach {
                try validate($0, name: "idpIdentifiers[]", parent: name, max: 40)
                try validate($0, name: "idpIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "idpIdentifiers[]", parent: name, pattern: "[\\w\\s+=.@-]+")
            }
            try self.validate(self.idpIdentifiers, name: "idpIdentifiers", parent: name, max: 50)
            try self.validate(self.idpIdentifiers, name: "idpIdentifiers", parent: name, min: 0)
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "[^_][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeMapping = "AttributeMapping"
            case idpIdentifiers = "IdpIdentifiers"
            case providerDetails = "ProviderDetails"
            case providerName = "ProviderName"
            case providerType = "ProviderType"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateIdentityProviderResponse: AWSDecodableShape {
        /// The newly created identity provider object.
        public let identityProvider: IdentityProviderType

        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct CreateResourceServerRequest: AWSEncodableShape {
        /// A unique resource server identifier for the resource server. This could be an HTTPS endpoint where the resource server is located. For example, https://my-weather-api.example.com.
        public let identifier: String
        /// A friendly name for the resource server.
        public let name: String
        /// A list of scopes. Each scope is map, where the keys are name and description.
        public let scopes: [ResourceServerScopeType]?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(identifier: String, name: String, scopes: [ResourceServerScopeType]? = nil, userPoolId: String) {
            self.identifier = identifier
            self.name = name
            self.scopes = scopes
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "[\\x21\\x23-\\x5B\\x5D-\\x7E]+")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[\\w\\s+=,.@-]+")
            try self.scopes?.forEach {
                try $0.validate(name: "\(name).scopes[]")
            }
            try self.validate(self.scopes, name: "scopes", parent: name, max: 100)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case name = "Name"
            case scopes = "Scopes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateResourceServerResponse: AWSDecodableShape {
        /// The newly created resource server.
        public let resourceServer: ResourceServerType

        public init(resourceServer: ResourceServerType) {
            self.resourceServer = resourceServer
        }

        private enum CodingKeys: String, CodingKey {
            case resourceServer = "ResourceServer"
        }
    }

    public struct CreateUserImportJobRequest: AWSEncodableShape {
        /// The role ARN for the Amazon CloudWatch Logging role for the user import job.
        public let cloudWatchLogsRoleArn: String
        /// The job name for the user import job.
        public let jobName: String
        /// The user pool ID for the user pool that the users are being imported into.
        public let userPoolId: String

        public init(cloudWatchLogsRoleArn: String, jobName: String, userPoolId: String) {
            self.cloudWatchLogsRoleArn = cloudWatchLogsRoleArn
            self.jobName = jobName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLogsRoleArn, name: "cloudWatchLogsRoleArn", parent: name, max: 2048)
            try self.validate(self.cloudWatchLogsRoleArn, name: "cloudWatchLogsRoleArn", parent: name, min: 20)
            try self.validate(self.cloudWatchLogsRoleArn, name: "cloudWatchLogsRoleArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 128)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "[\\w\\s+=,.@-]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogsRoleArn = "CloudWatchLogsRoleArn"
            case jobName = "JobName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateUserImportJobResponse: AWSDecodableShape {
        /// The job object that represents the user import job.
        public let userImportJob: UserImportJobType?

        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct CreateUserPoolClientRequest: AWSEncodableShape {
        /// The time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used. This value will be overridden if you have entered a value in TokenValidityUnits.
        public let accessTokenValidity: Int?
        /// The allowed OAuth flows. Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint. Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly. Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination of client and client_secret.
        public let allowedOAuthFlows: [OAuthFlowType]?
        /// Set to true if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
        public let allowedOAuthFlowsUserPoolClient: Bool?
        /// The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values provided by AWS are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.
        public let allowedOAuthScopes: [String]?
        /// The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.  In regions where Pinpoint is not available, Cognito User Pools only supports sending events to Amazon Pinpoint projects in us-east-1. In regions where Pinpoint is available, Cognito User Pools will support sending events to Amazon Pinpoint projects within that same region.
        public let analyticsConfiguration: AnalyticsConfigurationType?
        /// A list of allowed redirect (callback) URLs for the identity providers. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let callbackURLs: [String]?
        /// The client name for the user pool client you would like to create.
        public let clientName: String
        /// The default redirect URI. Must be in the CallbackURLs list. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let defaultRedirectURI: String?
        /// The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are deprecated in favor of new names with the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along with values without ALLOW_ prefix. Valid values include:    ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Cognito receives the password in the request instead of using the SRP (Secure Remote Password protocol) protocol to verify passwords.    ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.    ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Cognito receives the password in the request instead of using the SRP protocol to verify passwords.    ALLOW_USER_SRP_AUTH: Enable SRP based authentication.    ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.
        public let explicitAuthFlows: [ExplicitAuthFlowsType]?
        /// Boolean to specify whether you want to generate a secret for the user pool client being created.
        public let generateSecret: Bool?
        /// The time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used. This value will be overridden if you have entered a value in TokenValidityUnits.
        public let idTokenValidity: Int?
        /// A list of allowed logout URLs for the identity providers.
        public let logoutURLs: [String]?
        /// Use this setting to choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to ENABLED and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs will return a UserNotFoundException exception if the user does not exist in the user pool. Valid values include:    ENABLED - This prevents user existence-related errors.    LEGACY - This represents the old behavior of Cognito where user existence related errors are not prevented.    After February 15th 2020, the value of PreventUserExistenceErrors will default to ENABLED for newly created user pool clients if no value is provided.
        public let preventUserExistenceErrors: PreventUserExistenceErrorTypes?
        /// The read attributes.
        public let readAttributes: [String]?
        /// The time limit, in days, after which the refresh token is no longer valid and cannot be used.
        public let refreshTokenValidity: Int?
        /// A list of provider names for the identity providers that are supported on this client. The following are supported: COGNITO, Facebook, Google and LoginWithAmazon.
        public let supportedIdentityProviders: [String]?
        /// The units in which the validity times are represented in. Default for RefreshToken is days, and default for ID and access tokens are hours.
        public let tokenValidityUnits: TokenValidityUnitsType?
        /// The user pool ID for the user pool where you want to create a user pool client.
        public let userPoolId: String
        /// The user pool attributes that the app client can write to. If your app client allows users to sign in through an identity provider, this array must include all attributes that are mapped to identity provider attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If your app client lacks write access to a mapped attribute, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.
        public let writeAttributes: [String]?

        public init(accessTokenValidity: Int? = nil, allowedOAuthFlows: [OAuthFlowType]? = nil, allowedOAuthFlowsUserPoolClient: Bool? = nil, allowedOAuthScopes: [String]? = nil, analyticsConfiguration: AnalyticsConfigurationType? = nil, callbackURLs: [String]? = nil, clientName: String, defaultRedirectURI: String? = nil, explicitAuthFlows: [ExplicitAuthFlowsType]? = nil, generateSecret: Bool? = nil, idTokenValidity: Int? = nil, logoutURLs: [String]? = nil, preventUserExistenceErrors: PreventUserExistenceErrorTypes? = nil, readAttributes: [String]? = nil, refreshTokenValidity: Int? = nil, supportedIdentityProviders: [String]? = nil, tokenValidityUnits: TokenValidityUnitsType? = nil, userPoolId: String, writeAttributes: [String]? = nil) {
            self.accessTokenValidity = accessTokenValidity
            self.allowedOAuthFlows = allowedOAuthFlows
            self.allowedOAuthFlowsUserPoolClient = allowedOAuthFlowsUserPoolClient
            self.allowedOAuthScopes = allowedOAuthScopes
            self.analyticsConfiguration = analyticsConfiguration
            self.callbackURLs = callbackURLs
            self.clientName = clientName
            self.defaultRedirectURI = defaultRedirectURI
            self.explicitAuthFlows = explicitAuthFlows
            self.generateSecret = generateSecret
            self.idTokenValidity = idTokenValidity
            self.logoutURLs = logoutURLs
            self.preventUserExistenceErrors = preventUserExistenceErrors
            self.readAttributes = readAttributes
            self.refreshTokenValidity = refreshTokenValidity
            self.supportedIdentityProviders = supportedIdentityProviders
            self.tokenValidityUnits = tokenValidityUnits
            self.userPoolId = userPoolId
            self.writeAttributes = writeAttributes
        }

        public func validate(name: String) throws {
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, max: 86400)
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, min: 1)
            try self.validate(self.allowedOAuthFlows, name: "allowedOAuthFlows", parent: name, max: 3)
            try self.validate(self.allowedOAuthFlows, name: "allowedOAuthFlows", parent: name, min: 0)
            try self.allowedOAuthScopes?.forEach {
                try validate($0, name: "allowedOAuthScopes[]", parent: name, max: 256)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, min: 1)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, pattern: "[\\x21\\x23-\\x5B\\x5D-\\x7E]+")
            }
            try self.validate(self.allowedOAuthScopes, name: "allowedOAuthScopes", parent: name, max: 50)
            try self.analyticsConfiguration?.validate(name: "\(name).analyticsConfiguration")
            try self.callbackURLs?.forEach {
                try validate($0, name: "callbackURLs[]", parent: name, max: 1024)
                try validate($0, name: "callbackURLs[]", parent: name, min: 1)
                try validate($0, name: "callbackURLs[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.callbackURLs, name: "callbackURLs", parent: name, max: 100)
            try self.validate(self.callbackURLs, name: "callbackURLs", parent: name, min: 0)
            try self.validate(self.clientName, name: "clientName", parent: name, max: 128)
            try self.validate(self.clientName, name: "clientName", parent: name, min: 1)
            try self.validate(self.clientName, name: "clientName", parent: name, pattern: "[\\w\\s+=,.@-]+")
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, max: 1024)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, min: 1)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, max: 86400)
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, min: 1)
            try self.logoutURLs?.forEach {
                try validate($0, name: "logoutURLs[]", parent: name, max: 1024)
                try validate($0, name: "logoutURLs[]", parent: name, min: 1)
                try validate($0, name: "logoutURLs[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.logoutURLs, name: "logoutURLs", parent: name, max: 100)
            try self.validate(self.logoutURLs, name: "logoutURLs", parent: name, min: 0)
            try self.readAttributes?.forEach {
                try validate($0, name: "readAttributes[]", parent: name, max: 2048)
                try validate($0, name: "readAttributes[]", parent: name, min: 1)
            }
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, max: 315_360_000)
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, min: 0)
            try self.supportedIdentityProviders?.forEach {
                try validate($0, name: "supportedIdentityProviders[]", parent: name, max: 32)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, min: 1)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
            try self.writeAttributes?.forEach {
                try validate($0, name: "writeAttributes[]", parent: name, max: 2048)
                try validate($0, name: "writeAttributes[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessTokenValidity = "AccessTokenValidity"
            case allowedOAuthFlows = "AllowedOAuthFlows"
            case allowedOAuthFlowsUserPoolClient = "AllowedOAuthFlowsUserPoolClient"
            case allowedOAuthScopes = "AllowedOAuthScopes"
            case analyticsConfiguration = "AnalyticsConfiguration"
            case callbackURLs = "CallbackURLs"
            case clientName = "ClientName"
            case defaultRedirectURI = "DefaultRedirectURI"
            case explicitAuthFlows = "ExplicitAuthFlows"
            case generateSecret = "GenerateSecret"
            case idTokenValidity = "IdTokenValidity"
            case logoutURLs = "LogoutURLs"
            case preventUserExistenceErrors = "PreventUserExistenceErrors"
            case readAttributes = "ReadAttributes"
            case refreshTokenValidity = "RefreshTokenValidity"
            case supportedIdentityProviders = "SupportedIdentityProviders"
            case tokenValidityUnits = "TokenValidityUnits"
            case userPoolId = "UserPoolId"
            case writeAttributes = "WriteAttributes"
        }
    }

    public struct CreateUserPoolClientResponse: AWSDecodableShape {
        /// The user pool client that was just created.
        public let userPoolClient: UserPoolClientType?

        public init(userPoolClient: UserPoolClientType? = nil) {
            self.userPoolClient = userPoolClient
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolClient = "UserPoolClient"
        }
    }

    public struct CreateUserPoolDomainRequest: AWSEncodableShape {
        /// The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application. Provide this parameter only if you want to use a custom domain for your user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito hosted domain instead. For more information about the hosted domain and custom domains, see Configuring a User Pool Domain.
        public let customDomainConfig: CustomDomainConfigType?
        /// The domain string.
        public let domain: String
        /// The user pool ID.
        public let userPoolId: String

        public init(customDomainConfig: CustomDomainConfigType? = nil, domain: String, userPoolId: String) {
            self.customDomainConfig = customDomainConfig
            self.domain = domain
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.customDomainConfig?.validate(name: "\(name).customDomainConfig")
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case customDomainConfig = "CustomDomainConfig"
            case domain = "Domain"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateUserPoolDomainResponse: AWSDecodableShape {
        /// The Amazon CloudFront endpoint that you use as the target of the alias that you set up with your Domain Name Service (DNS) provider.
        public let cloudFrontDomain: String?

        public init(cloudFrontDomain: String? = nil) {
            self.cloudFrontDomain = cloudFrontDomain
        }

        private enum CodingKeys: String, CodingKey {
            case cloudFrontDomain = "CloudFrontDomain"
        }
    }

    public struct CreateUserPoolRequest: AWSEncodableShape {
        /// Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword. It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.
        public let accountRecoverySetting: AccountRecoverySettingType?
        /// The configuration for AdminCreateUser requests.
        public let adminCreateUserConfig: AdminCreateUserConfigType?
        /// Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.
        public let aliasAttributes: [AliasAttributeType]?
        /// The attributes to be auto-verified. Possible values: email, phone_number.
        public let autoVerifiedAttributes: [VerifiedAttributeType]?
        /// The device configuration.
        public let deviceConfiguration: DeviceConfigurationType?
        /// The email configuration.
        public let emailConfiguration: EmailConfigurationType?
        /// A string representing the email verification message. EmailVerificationMessage is allowed only if EmailSendingAccount is DEVELOPER.
        public let emailVerificationMessage: String?
        /// A string representing the email verification subject. EmailVerificationSubject is allowed only if EmailSendingAccount is DEVELOPER.
        public let emailVerificationSubject: String?
        /// The Lambda trigger configuration information for the new user pool.  In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you will need to make an extra call to add permission for these event sources to invoke your Lambda function.  For more information on using the Lambda API to add permission, see  AddPermission .  For adding permission using the AWS CLI, see  add-permission .
        public let lambdaConfig: LambdaConfigType?
        /// Specifies MFA configuration details.
        public let mfaConfiguration: UserPoolMfaType?
        /// The policies associated with the new user pool.
        public let policies: UserPoolPolicyType?
        /// A string used to name the user pool.
        public let poolName: String
        /// An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.
        public let schema: [SchemaAttributeType]?
        /// A string representing the SMS authentication message.
        public let smsAuthenticationMessage: String?
        /// The SMS configuration.
        public let smsConfiguration: SmsConfigurationType?
        /// A string representing the SMS verification message.
        public let smsVerificationMessage: String?
        /// Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.
        public let usernameAttributes: [UsernameAttributeType]?
        /// You can choose to set case sensitivity on the username input for the selected sign-in option. For example, when this is set to False, users will be able to sign in using either "username" or "Username". This configuration is immutable once it has been set. For more information, see UsernameConfigurationType.
        public let usernameConfiguration: UsernameConfigurationType?
        /// Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".
        public let userPoolAddOns: UserPoolAddOnsType?
        /// The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.
        public let userPoolTags: [String: String]?
        /// The template for the verification message that the user sees when the app requests permission to access the user's information.
        public let verificationMessageTemplate: VerificationMessageTemplateType?

        public init(accountRecoverySetting: AccountRecoverySettingType? = nil, adminCreateUserConfig: AdminCreateUserConfigType? = nil, aliasAttributes: [AliasAttributeType]? = nil, autoVerifiedAttributes: [VerifiedAttributeType]? = nil, deviceConfiguration: DeviceConfigurationType? = nil, emailConfiguration: EmailConfigurationType? = nil, emailVerificationMessage: String? = nil, emailVerificationSubject: String? = nil, lambdaConfig: LambdaConfigType? = nil, mfaConfiguration: UserPoolMfaType? = nil, policies: UserPoolPolicyType? = nil, poolName: String, schema: [SchemaAttributeType]? = nil, smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil, smsVerificationMessage: String? = nil, usernameAttributes: [UsernameAttributeType]? = nil, usernameConfiguration: UsernameConfigurationType? = nil, userPoolAddOns: UserPoolAddOnsType? = nil, userPoolTags: [String: String]? = nil, verificationMessageTemplate: VerificationMessageTemplateType? = nil) {
            self.accountRecoverySetting = accountRecoverySetting
            self.adminCreateUserConfig = adminCreateUserConfig
            self.aliasAttributes = aliasAttributes
            self.autoVerifiedAttributes = autoVerifiedAttributes
            self.deviceConfiguration = deviceConfiguration
            self.emailConfiguration = emailConfiguration
            self.emailVerificationMessage = emailVerificationMessage
            self.emailVerificationSubject = emailVerificationSubject
            self.lambdaConfig = lambdaConfig
            self.mfaConfiguration = mfaConfiguration
            self.policies = policies
            self.poolName = poolName
            self.schema = schema
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
            self.smsVerificationMessage = smsVerificationMessage
            self.usernameAttributes = usernameAttributes
            self.usernameConfiguration = usernameConfiguration
            self.userPoolAddOns = userPoolAddOns
            self.userPoolTags = userPoolTags
            self.verificationMessageTemplate = verificationMessageTemplate
        }

        public func validate(name: String) throws {
            try self.accountRecoverySetting?.validate(name: "\(name).accountRecoverySetting")
            try self.adminCreateUserConfig?.validate(name: "\(name).adminCreateUserConfig")
            try self.emailConfiguration?.validate(name: "\(name).emailConfiguration")
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, max: 20000)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, min: 6)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*")
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, max: 140)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, min: 1)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+")
            try self.lambdaConfig?.validate(name: "\(name).lambdaConfig")
            try self.policies?.validate(name: "\(name).policies")
            try self.validate(self.poolName, name: "poolName", parent: name, max: 128)
            try self.validate(self.poolName, name: "poolName", parent: name, min: 1)
            try self.validate(self.poolName, name: "poolName", parent: name, pattern: "[\\w\\s+=,.@-]+")
            try self.schema?.forEach {
                try $0.validate(name: "\(name).schema[]")
            }
            try self.validate(self.schema, name: "schema", parent: name, max: 50)
            try self.validate(self.schema, name: "schema", parent: name, min: 1)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, max: 140)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, min: 6)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, pattern: ".*\\{####\\}.*")
            try self.smsConfiguration?.validate(name: "\(name).smsConfiguration")
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, max: 140)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, min: 6)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, pattern: ".*\\{####\\}.*")
            try self.userPoolTags?.forEach {
                try validate($0.key, name: "userPoolTags.key", parent: name, max: 128)
                try validate($0.key, name: "userPoolTags.key", parent: name, min: 1)
                try validate($0.value, name: "userPoolTags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "userPoolTags[\"\($0.key)\"]", parent: name, min: 0)
            }
            try self.verificationMessageTemplate?.validate(name: "\(name).verificationMessageTemplate")
        }

        private enum CodingKeys: String, CodingKey {
            case accountRecoverySetting = "AccountRecoverySetting"
            case adminCreateUserConfig = "AdminCreateUserConfig"
            case aliasAttributes = "AliasAttributes"
            case autoVerifiedAttributes = "AutoVerifiedAttributes"
            case deviceConfiguration = "DeviceConfiguration"
            case emailConfiguration = "EmailConfiguration"
            case emailVerificationMessage = "EmailVerificationMessage"
            case emailVerificationSubject = "EmailVerificationSubject"
            case lambdaConfig = "LambdaConfig"
            case mfaConfiguration = "MfaConfiguration"
            case policies = "Policies"
            case poolName = "PoolName"
            case schema = "Schema"
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
            case smsVerificationMessage = "SmsVerificationMessage"
            case usernameAttributes = "UsernameAttributes"
            case usernameConfiguration = "UsernameConfiguration"
            case userPoolAddOns = "UserPoolAddOns"
            case userPoolTags = "UserPoolTags"
            case verificationMessageTemplate = "VerificationMessageTemplate"
        }
    }

    public struct CreateUserPoolResponse: AWSDecodableShape {
        /// A container for the user pool details.
        public let userPool: UserPoolType?

        public init(userPool: UserPoolType? = nil) {
            self.userPool = userPool
        }

        private enum CodingKeys: String, CodingKey {
            case userPool = "UserPool"
        }
    }

    public struct CustomDomainConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an AWS Certificate Manager SSL certificate. You use this certificate for the subdomain of your custom domain.
        public let certificateArn: String

        public init(certificateArn: String) {
            self.certificateArn = certificateArn
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, max: 2048)
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, min: 20)
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "CertificateArn"
        }
    }

    public struct CustomEmailLambdaVersionConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send email notifications to users.
        public let lambdaArn: String
        /// The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.
        public let lambdaVersion: CustomEmailSenderLambdaVersionType

        public init(lambdaArn: String, lambdaVersion: CustomEmailSenderLambdaVersionType) {
            self.lambdaArn = lambdaArn
            self.lambdaVersion = lambdaVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 2048)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, min: 20)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaArn = "LambdaArn"
            case lambdaVersion = "LambdaVersion"
        }
    }

    public struct CustomSMSLambdaVersionConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send SMS notifications to users.
        public let lambdaArn: String
        /// The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.
        public let lambdaVersion: CustomSMSSenderLambdaVersionType

        public init(lambdaArn: String, lambdaVersion: CustomSMSSenderLambdaVersionType) {
            self.lambdaArn = lambdaArn
            self.lambdaVersion = lambdaVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 2048)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, min: 20)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaArn = "LambdaArn"
            case lambdaVersion = "LambdaVersion"
        }
    }

    public struct DeleteGroupRequest: AWSEncodableShape {
        /// The name of the group.
        public let groupName: String
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(groupName: String, userPoolId: String) {
            self.groupName = groupName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteIdentityProviderRequest: AWSEncodableShape {
        /// The identity provider name.
        public let providerName: String
        /// The user pool ID.
        public let userPoolId: String

        public init(providerName: String, userPoolId: String) {
            self.providerName = providerName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case providerName = "ProviderName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteResourceServerRequest: AWSEncodableShape {
        /// The identifier for the resource server.
        public let identifier: String
        /// The user pool ID for the user pool that hosts the resource server.
        public let userPoolId: String

        public init(identifier: String, userPoolId: String) {
            self.identifier = identifier
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "[\\x21\\x23-\\x5B\\x5D-\\x7E]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserAttributesRequest: AWSEncodableShape {
        /// The access token used in the request to delete user attributes.
        public let accessToken: String
        /// An array of strings representing the user attribute names you wish to delete. For custom attributes, you must prepend the custom: prefix to the attribute name.
        public let userAttributeNames: [String]

        public init(accessToken: String, userAttributeNames: [String]) {
            self.accessToken = accessToken
            self.userAttributeNames = userAttributeNames
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.userAttributeNames.forEach {
                try validate($0, name: "userAttributeNames[]", parent: name, max: 32)
                try validate($0, name: "userAttributeNames[]", parent: name, min: 1)
                try validate($0, name: "userAttributeNames[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case userAttributeNames = "UserAttributeNames"
        }
    }

    public struct DeleteUserAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteUserPoolClientRequest: AWSEncodableShape {
        /// The app client ID of the app associated with the user pool.
        public let clientId: String
        /// The user pool ID for the user pool where you want to delete the client.
        public let userPoolId: String

        public init(clientId: String, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserPoolDomainRequest: AWSEncodableShape {
        /// The domain string.
        public let domain: String
        /// The user pool ID.
        public let userPoolId: String

        public init(domain: String, userPoolId: String) {
            self.domain = domain
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case domain = "Domain"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserPoolDomainResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteUserPoolRequest: AWSEncodableShape {
        /// The user pool ID for the user pool you want to delete.
        public let userPoolId: String

        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserRequest: AWSEncodableShape {
        /// The access token from a request to delete a user.
        public let accessToken: String

        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct DescribeIdentityProviderRequest: AWSEncodableShape {
        /// The identity provider name.
        public let providerName: String
        /// The user pool ID.
        public let userPoolId: String

        public init(providerName: String, userPoolId: String) {
            self.providerName = providerName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case providerName = "ProviderName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeIdentityProviderResponse: AWSDecodableShape {
        /// The identity provider that was deleted.
        public let identityProvider: IdentityProviderType

        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct DescribeResourceServerRequest: AWSEncodableShape {
        /// The identifier for the resource server
        public let identifier: String
        /// The user pool ID for the user pool that hosts the resource server.
        public let userPoolId: String

        public init(identifier: String, userPoolId: String) {
            self.identifier = identifier
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "[\\x21\\x23-\\x5B\\x5D-\\x7E]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeResourceServerResponse: AWSDecodableShape {
        /// The resource server.
        public let resourceServer: ResourceServerType

        public init(resourceServer: ResourceServerType) {
            self.resourceServer = resourceServer
        }

        private enum CodingKeys: String, CodingKey {
            case resourceServer = "ResourceServer"
        }
    }

    public struct DescribeRiskConfigurationRequest: AWSEncodableShape {
        /// The app client ID.
        public let clientId: String?
        /// The user pool ID.
        public let userPoolId: String

        public init(clientId: String? = nil, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeRiskConfigurationResponse: AWSDecodableShape {
        /// The risk configuration.
        public let riskConfiguration: RiskConfigurationType

        public init(riskConfiguration: RiskConfigurationType) {
            self.riskConfiguration = riskConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case riskConfiguration = "RiskConfiguration"
        }
    }

    public struct DescribeUserImportJobRequest: AWSEncodableShape {
        /// The job ID for the user import job.
        public let jobId: String
        /// The user pool ID for the user pool that the users are being imported into.
        public let userPoolId: String

        public init(jobId: String, userPoolId: String) {
            self.jobId = jobId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 55)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "import-[0-9a-zA-Z-]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeUserImportJobResponse: AWSDecodableShape {
        /// The job object that represents the user import job.
        public let userImportJob: UserImportJobType?

        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct DescribeUserPoolClientRequest: AWSEncodableShape {
        /// The app client ID of the app associated with the user pool.
        public let clientId: String
        /// The user pool ID for the user pool you want to describe.
        public let userPoolId: String

        public init(clientId: String, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeUserPoolClientResponse: AWSDecodableShape {
        /// The user pool client from a server response to describe the user pool client.
        public let userPoolClient: UserPoolClientType?

        public init(userPoolClient: UserPoolClientType? = nil) {
            self.userPoolClient = userPoolClient
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolClient = "UserPoolClient"
        }
    }

    public struct DescribeUserPoolDomainRequest: AWSEncodableShape {
        /// The domain string.
        public let domain: String

        public init(domain: String) {
            self.domain = domain
        }

        public func validate(name: String) throws {
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
        }

        private enum CodingKeys: String, CodingKey {
            case domain = "Domain"
        }
    }

    public struct DescribeUserPoolDomainResponse: AWSDecodableShape {
        /// A domain description object containing information about the domain.
        public let domainDescription: DomainDescriptionType?

        public init(domainDescription: DomainDescriptionType? = nil) {
            self.domainDescription = domainDescription
        }

        private enum CodingKeys: String, CodingKey {
            case domainDescription = "DomainDescription"
        }
    }

    public struct DescribeUserPoolRequest: AWSEncodableShape {
        /// The user pool ID for the user pool you want to describe.
        public let userPoolId: String

        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeUserPoolResponse: AWSDecodableShape {
        /// The container of metadata returned by the server to describe the pool.
        public let userPool: UserPoolType?

        public init(userPool: UserPoolType? = nil) {
            self.userPool = userPool
        }

        private enum CodingKeys: String, CodingKey {
            case userPool = "UserPool"
        }
    }

    public struct DeviceConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether a challenge is required on a new device. Only applicable to a new device.
        public let challengeRequiredOnNewDevice: Bool?
        /// If true, a device is only remembered on user prompt.
        public let deviceOnlyRememberedOnUserPrompt: Bool?

        public init(challengeRequiredOnNewDevice: Bool? = nil, deviceOnlyRememberedOnUserPrompt: Bool? = nil) {
            self.challengeRequiredOnNewDevice = challengeRequiredOnNewDevice
            self.deviceOnlyRememberedOnUserPrompt = deviceOnlyRememberedOnUserPrompt
        }

        private enum CodingKeys: String, CodingKey {
            case challengeRequiredOnNewDevice = "ChallengeRequiredOnNewDevice"
            case deviceOnlyRememberedOnUserPrompt = "DeviceOnlyRememberedOnUserPrompt"
        }
    }

    public struct DeviceSecretVerifierConfigType: AWSEncodableShape {
        /// The password verifier.
        public let passwordVerifier: String?
        /// The salt.
        public let salt: String?

        public init(passwordVerifier: String? = nil, salt: String? = nil) {
            self.passwordVerifier = passwordVerifier
            self.salt = salt
        }

        private enum CodingKeys: String, CodingKey {
            case passwordVerifier = "PasswordVerifier"
            case salt = "Salt"
        }
    }

    public struct DeviceType: AWSDecodableShape {
        /// The device attributes.
        public let deviceAttributes: [AttributeType]?
        /// The creation date of the device.
        public let deviceCreateDate: Date?
        /// The device key.
        public let deviceKey: String?
        /// The date in which the device was last authenticated.
        public let deviceLastAuthenticatedDate: Date?
        /// The last modified date of the device.
        public let deviceLastModifiedDate: Date?

        public init(deviceAttributes: [AttributeType]? = nil, deviceCreateDate: Date? = nil, deviceKey: String? = nil, deviceLastAuthenticatedDate: Date? = nil, deviceLastModifiedDate: Date? = nil) {
            self.deviceAttributes = deviceAttributes
            self.deviceCreateDate = deviceCreateDate
            self.deviceKey = deviceKey
            self.deviceLastAuthenticatedDate = deviceLastAuthenticatedDate
            self.deviceLastModifiedDate = deviceLastModifiedDate
        }

        private enum CodingKeys: String, CodingKey {
            case deviceAttributes = "DeviceAttributes"
            case deviceCreateDate = "DeviceCreateDate"
            case deviceKey = "DeviceKey"
            case deviceLastAuthenticatedDate = "DeviceLastAuthenticatedDate"
            case deviceLastModifiedDate = "DeviceLastModifiedDate"
        }
    }

    public struct DomainDescriptionType: AWSDecodableShape {
        /// The AWS account ID for the user pool owner.
        public let aWSAccountId: String?
        /// The ARN of the CloudFront distribution.
        public let cloudFrontDistribution: String?
        /// The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.
        public let customDomainConfig: CustomDomainConfigType?
        /// The domain string.
        public let domain: String?
        /// The S3 bucket where the static files for this domain are stored.
        public let s3Bucket: String?
        /// The domain status.
        public let status: DomainStatusType?
        /// The user pool ID.
        public let userPoolId: String?
        /// The app version.
        public let version: String?

        public init(aWSAccountId: String? = nil, cloudFrontDistribution: String? = nil, customDomainConfig: CustomDomainConfigType? = nil, domain: String? = nil, s3Bucket: String? = nil, status: DomainStatusType? = nil, userPoolId: String? = nil, version: String? = nil) {
            self.aWSAccountId = aWSAccountId
            self.cloudFrontDistribution = cloudFrontDistribution
            self.customDomainConfig = customDomainConfig
            self.domain = domain
            self.s3Bucket = s3Bucket
            self.status = status
            self.userPoolId = userPoolId
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case aWSAccountId = "AWSAccountId"
            case cloudFrontDistribution = "CloudFrontDistribution"
            case customDomainConfig = "CustomDomainConfig"
            case domain = "Domain"
            case s3Bucket = "S3Bucket"
            case status = "Status"
            case userPoolId = "UserPoolId"
            case version = "Version"
        }
    }

    public struct EmailConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The set of configuration rules that can be applied to emails sent using Amazon SES. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:    Event publishing – Amazon SES can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as SNS and CloudWatch.   IP pool management – When leasing dedicated IP addresses with Amazon SES, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.
        public let configurationSet: String?
        /// Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:  COGNITO_DEFAULT  When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration. To look up the email delivery limit for the default option, see Limits in Amazon Cognito in the Amazon Cognito Developer Guide. The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.  If EmailSendingAccount is COGNITO_DEFAULT, the following parameters aren't allowed:   EmailVerificationMessage   EmailVerificationSubject   InviteMessageTemplate.EmailMessage   InviteMessageTemplate.EmailSubject   VerificationMessageTemplate.EmailMessage   VerificationMessageTemplate.EmailMessageByLink   VerificationMessageTemplate.EmailSubject,   VerificationMessageTemplate.EmailSubjectByLink    DEVELOPER EmailSendingAccount is required.   DEVELOPER  When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account. If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter. Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.
        public let emailSendingAccount: EmailSendingAccountType?
        /// Identifies either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or Test User &lt;testuser@example.com&gt;. This address will appear before the body of the email.
        public let from: String?
        /// The destination to which the receiver of the email should reply to.
        public let replyToEmailAddress: String?
        /// The Amazon Resource Name (ARN) of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:   If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.   If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.
        public let sourceArn: String?

        public init(configurationSet: String? = nil, emailSendingAccount: EmailSendingAccountType? = nil, from: String? = nil, replyToEmailAddress: String? = nil, sourceArn: String? = nil) {
            self.configurationSet = configurationSet
            self.emailSendingAccount = emailSendingAccount
            self.from = from
            self.replyToEmailAddress = replyToEmailAddress
            self.sourceArn = sourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationSet, name: "configurationSet", parent: name, max: 64)
            try self.validate(self.configurationSet, name: "configurationSet", parent: name, min: 1)
            try self.validate(self.configurationSet, name: "configurationSet", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.replyToEmailAddress, name: "replyToEmailAddress", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+@[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, max: 2048)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, min: 20)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationSet = "ConfigurationSet"
            case emailSendingAccount = "EmailSendingAccount"
            case from = "From"
            case replyToEmailAddress = "ReplyToEmailAddress"
            case sourceArn = "SourceArn"
        }
    }

    public struct EventContextDataType: AWSDecodableShape {
        /// The user's city.
        public let city: String?
        /// The user's country.
        public let country: String?
        /// The user's device name.
        public let deviceName: String?
        /// The user's IP address.
        public let ipAddress: String?
        /// The user's time zone.
        public let timezone: String?

        public init(city: String? = nil, country: String? = nil, deviceName: String? = nil, ipAddress: String? = nil, timezone: String? = nil) {
            self.city = city
            self.country = country
            self.deviceName = deviceName
            self.ipAddress = ipAddress
            self.timezone = timezone
        }

        private enum CodingKeys: String, CodingKey {
            case city = "City"
            case country = "Country"
            case deviceName = "DeviceName"
            case ipAddress = "IpAddress"
            case timezone = "Timezone"
        }
    }

    public struct EventFeedbackType: AWSDecodableShape {
        /// The event feedback date.
        public let feedbackDate: Date?
        /// The event feedback value.
        public let feedbackValue: FeedbackValueType
        /// The provider.
        public let provider: String

        public init(feedbackDate: Date? = nil, feedbackValue: FeedbackValueType, provider: String) {
            self.feedbackDate = feedbackDate
            self.feedbackValue = feedbackValue
            self.provider = provider
        }

        private enum CodingKeys: String, CodingKey {
            case feedbackDate = "FeedbackDate"
            case feedbackValue = "FeedbackValue"
            case provider = "Provider"
        }
    }

    public struct EventRiskType: AWSDecodableShape {
        /// Indicates whether compromised credentials were detected during an authentication event.
        public let compromisedCredentialsDetected: Bool?
        /// The risk decision.
        public let riskDecision: RiskDecisionType?
        /// The risk level.
        public let riskLevel: RiskLevelType?

        public init(compromisedCredentialsDetected: Bool? = nil, riskDecision: RiskDecisionType? = nil, riskLevel: RiskLevelType? = nil) {
            self.compromisedCredentialsDetected = compromisedCredentialsDetected
            self.riskDecision = riskDecision
            self.riskLevel = riskLevel
        }

        private enum CodingKeys: String, CodingKey {
            case compromisedCredentialsDetected = "CompromisedCredentialsDetected"
            case riskDecision = "RiskDecision"
            case riskLevel = "RiskLevel"
        }
    }

    public struct ForgetDeviceRequest: AWSEncodableShape {
        /// The access token for the forgotten device request.
        public let accessToken: String?
        /// The device key.
        public let deviceKey: String

        public init(accessToken: String? = nil, deviceKey: String) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "[\\w-]+_[0-9a-f-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
        }
    }

    public struct ForgotPasswordRequest: AWSEncodableShape {
        /// The Amazon Pinpoint analytics metadata for collecting metrics for ForgotPassword calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the client associated with the user pool.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ForgotPassword API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and user migration. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ForgotPassword request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.
        public let secretHash: String?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let userContextData: UserContextDataType?
        /// The user name of the user for whom you want to enter a code to reset a forgotten password.
        public let username: String

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, secretHash: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.secretHash = secretHash
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "[\\w+=/]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case secretHash = "SecretHash"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ForgotPasswordResponse: AWSDecodableShape {
        /// The code delivery details returned by the server in response to the request to reset a password.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?

        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil) {
            self.codeDeliveryDetails = codeDeliveryDetails
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
        }
    }

    public struct GetCSVHeaderRequest: AWSEncodableShape {
        /// The user pool ID for the user pool that the users are to be imported into.
        public let userPoolId: String

        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetCSVHeaderResponse: AWSDecodableShape {
        /// The header information for the .csv file for the user import job.
        public let cSVHeader: [String]?
        /// The user pool ID for the user pool that the users are to be imported into.
        public let userPoolId: String?

        public init(cSVHeader: [String]? = nil, userPoolId: String? = nil) {
            self.cSVHeader = cSVHeader
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case cSVHeader = "CSVHeader"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetDeviceRequest: AWSEncodableShape {
        /// The access token.
        public let accessToken: String?
        /// The device key.
        public let deviceKey: String

        public init(accessToken: String? = nil, deviceKey: String) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "[\\w-]+_[0-9a-f-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
        }
    }

    public struct GetDeviceResponse: AWSDecodableShape {
        /// The device.
        public let device: DeviceType

        public init(device: DeviceType) {
            self.device = device
        }

        private enum CodingKeys: String, CodingKey {
            case device = "Device"
        }
    }

    public struct GetGroupRequest: AWSEncodableShape {
        /// The name of the group.
        public let groupName: String
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(groupName: String, userPoolId: String) {
            self.groupName = groupName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetGroupResponse: AWSDecodableShape {
        /// The group object for the group.
        public let group: GroupType?

        public init(group: GroupType? = nil) {
            self.group = group
        }

        private enum CodingKeys: String, CodingKey {
            case group = "Group"
        }
    }

    public struct GetIdentityProviderByIdentifierRequest: AWSEncodableShape {
        /// The identity provider ID.
        public let idpIdentifier: String
        /// The user pool ID.
        public let userPoolId: String

        public init(idpIdentifier: String, userPoolId: String) {
            self.idpIdentifier = idpIdentifier
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.idpIdentifier, name: "idpIdentifier", parent: name, max: 40)
            try self.validate(self.idpIdentifier, name: "idpIdentifier", parent: name, min: 1)
            try self.validate(self.idpIdentifier, name: "idpIdentifier", parent: name, pattern: "[\\w\\s+=.@-]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case idpIdentifier = "IdpIdentifier"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetIdentityProviderByIdentifierResponse: AWSDecodableShape {
        /// The identity provider object.
        public let identityProvider: IdentityProviderType

        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct GetSigningCertificateRequest: AWSEncodableShape {
        /// The user pool ID.
        public let userPoolId: String

        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetSigningCertificateResponse: AWSDecodableShape {
        /// The signing certificate.
        public let certificate: String?

        public init(certificate: String? = nil) {
            self.certificate = certificate
        }

        private enum CodingKeys: String, CodingKey {
            case certificate = "Certificate"
        }
    }

    public struct GetUICustomizationRequest: AWSEncodableShape {
        /// The client ID for the client app.
        public let clientId: String?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(clientId: String? = nil, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetUICustomizationResponse: AWSDecodableShape {
        /// The UI customization information.
        public let uICustomization: UICustomizationType

        public init(uICustomization: UICustomizationType) {
            self.uICustomization = uICustomization
        }

        private enum CodingKeys: String, CodingKey {
            case uICustomization = "UICustomization"
        }
    }

    public struct GetUserAttributeVerificationCodeRequest: AWSEncodableShape {
        /// The access token returned by the server response to get the user attribute verification code.
        public let accessToken: String
        /// The attribute name returned by the server response to get the user attribute verification code.
        public let attributeName: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the GetUserAttributeVerificationCode API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your GetUserAttributeVerificationCode request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?

        public init(accessToken: String, attributeName: String, clientMetadata: [String: String]? = nil) {
            self.accessToken = accessToken
            self.attributeName = attributeName
            self.clientMetadata = clientMetadata
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 32)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case attributeName = "AttributeName"
            case clientMetadata = "ClientMetadata"
        }
    }

    public struct GetUserAttributeVerificationCodeResponse: AWSDecodableShape {
        /// The code delivery details returned by the server in response to the request to get the user attribute verification code.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?

        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil) {
            self.codeDeliveryDetails = codeDeliveryDetails
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
        }
    }

    public struct GetUserPoolMfaConfigRequest: AWSEncodableShape {
        /// The user pool ID.
        public let userPoolId: String

        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetUserPoolMfaConfigResponse: AWSDecodableShape {
        /// The multi-factor (MFA) configuration. Valid values include:    OFF MFA will not be used for any users.    ON MFA is required for all users to sign in.    OPTIONAL MFA will be required only for individual users who have an MFA factor enabled.
        public let mfaConfiguration: UserPoolMfaType?
        /// The SMS text message multi-factor (MFA) configuration.
        public let smsMfaConfiguration: SmsMfaConfigType?
        /// The software token multi-factor (MFA) configuration.
        public let softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType?

        public init(mfaConfiguration: UserPoolMfaType? = nil, smsMfaConfiguration: SmsMfaConfigType? = nil, softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType? = nil) {
            self.mfaConfiguration = mfaConfiguration
            self.smsMfaConfiguration = smsMfaConfiguration
            self.softwareTokenMfaConfiguration = softwareTokenMfaConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case mfaConfiguration = "MfaConfiguration"
            case smsMfaConfiguration = "SmsMfaConfiguration"
            case softwareTokenMfaConfiguration = "SoftwareTokenMfaConfiguration"
        }
    }

    public struct GetUserRequest: AWSEncodableShape {
        /// The access token returned by the server response to get information about the user.
        public let accessToken: String

        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct GetUserResponse: AWSDecodableShape {
        ///  This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about TOTP software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.
        public let mFAOptions: [MFAOptionType]?
        /// The user's preferred MFA setting.
        public let preferredMfaSetting: String?
        /// An array of name-value pairs representing user attributes. For custom attributes, you must prepend the custom: prefix to the attribute name.
        public let userAttributes: [AttributeType]
        /// The MFA options that are enabled for the user. The possible values in this list are SMS_MFA and SOFTWARE_TOKEN_MFA.
        public let userMFASettingList: [String]?
        /// The user name of the user you wish to retrieve from the get user request.
        public let username: String

        public init(mFAOptions: [MFAOptionType]? = nil, preferredMfaSetting: String? = nil, userAttributes: [AttributeType], userMFASettingList: [String]? = nil, username: String) {
            self.mFAOptions = mFAOptions
            self.preferredMfaSetting = preferredMfaSetting
            self.userAttributes = userAttributes
            self.userMFASettingList = userMFASettingList
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case mFAOptions = "MFAOptions"
            case preferredMfaSetting = "PreferredMfaSetting"
            case userAttributes = "UserAttributes"
            case userMFASettingList = "UserMFASettingList"
            case username = "Username"
        }
    }

    public struct GlobalSignOutRequest: AWSEncodableShape {
        /// The access token.
        public let accessToken: String

        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct GlobalSignOutResponse: AWSDecodableShape {
        public init() {}
    }

    public struct GroupType: AWSDecodableShape {
        /// The date the group was created.
        public let creationDate: Date?
        /// A string containing the description of the group.
        public let description: String?
        /// The name of the group.
        public let groupName: String?
        /// The date the group was last modified.
        public let lastModifiedDate: Date?
        /// A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. If a user belongs to two or more groups, it is the group with the highest precedence whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens. Groups with higher Precedence values take precedence over groups with lower Precedence values or with null Precedence values. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens. The default Precedence value is null.
        public let precedence: Int?
        /// The role ARN for the group.
        public let roleArn: String?
        /// The user pool ID for the user pool.
        public let userPoolId: String?

        public init(creationDate: Date? = nil, description: String? = nil, groupName: String? = nil, lastModifiedDate: Date? = nil, precedence: Int? = nil, roleArn: String? = nil, userPoolId: String? = nil) {
            self.creationDate = creationDate
            self.description = description
            self.groupName = groupName
            self.lastModifiedDate = lastModifiedDate
            self.precedence = precedence
            self.roleArn = roleArn
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case description = "Description"
            case groupName = "GroupName"
            case lastModifiedDate = "LastModifiedDate"
            case precedence = "Precedence"
            case roleArn = "RoleArn"
            case userPoolId = "UserPoolId"
        }
    }

    public struct HttpHeader: AWSEncodableShape {
        /// The header name
        public let headerName: String?
        /// The header value.
        public let headerValue: String?

        public init(headerName: String? = nil, headerValue: String? = nil) {
            self.headerName = headerName
            self.headerValue = headerValue
        }

        private enum CodingKeys: String, CodingKey {
            case headerName
            case headerValue
        }
    }

    public struct IdentityProviderType: AWSDecodableShape {
        /// A mapping of identity provider attributes to standard and custom user pool attributes.
        public let attributeMapping: [String: String]?
        /// The date the identity provider was created.
        public let creationDate: Date?
        /// A list of identity provider identifiers.
        public let idpIdentifiers: [String]?
        /// The date the identity provider was last modified.
        public let lastModifiedDate: Date?
        /// The identity provider details. The following list describes the provider detail keys for each identity provider type.   For Google and Login with Amazon:   client_id   client_secret   authorize_scopes     For Facebook:   client_id   client_secret   authorize_scopes   api_version     For Sign in with Apple:   client_id   team_id   key_id   private_key   authorize_scopes     For OIDC providers:   client_id   client_secret   attributes_request_method   oidc_issuer   authorize_scopes   authorize_url if not available from discovery URL specified by oidc_issuer key    token_url if not available from discovery URL specified by oidc_issuer key    attributes_url if not available from discovery URL specified by oidc_issuer key    jwks_uri if not available from discovery URL specified by oidc_issuer key    authorize_scopes     For SAML providers:   MetadataFile OR MetadataURL   IDPSignOut optional
        public let providerDetails: [String: String]?
        /// The identity provider name.
        public let providerName: String?
        /// The identity provider type.
        public let providerType: IdentityProviderTypeType?
        /// The user pool ID.
        public let userPoolId: String?

        public init(attributeMapping: [String: String]? = nil, creationDate: Date? = nil, idpIdentifiers: [String]? = nil, lastModifiedDate: Date? = nil, providerDetails: [String: String]? = nil, providerName: String? = nil, providerType: IdentityProviderTypeType? = nil, userPoolId: String? = nil) {
            self.attributeMapping = attributeMapping
            self.creationDate = creationDate
            self.idpIdentifiers = idpIdentifiers
            self.lastModifiedDate = lastModifiedDate
            self.providerDetails = providerDetails
            self.providerName = providerName
            self.providerType = providerType
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case attributeMapping = "AttributeMapping"
            case creationDate = "CreationDate"
            case idpIdentifiers = "IdpIdentifiers"
            case lastModifiedDate = "LastModifiedDate"
            case providerDetails = "ProviderDetails"
            case providerName = "ProviderName"
            case providerType = "ProviderType"
            case userPoolId = "UserPoolId"
        }
    }

    public struct InitiateAuthRequest: AWSEncodableShape {
        /// The Amazon Pinpoint analytics metadata for collecting metrics for InitiateAuth calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The authentication flow for this call to execute. The API action will depend on this value. For example:     REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.    USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.    USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.   Valid values include:    USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.    REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.    CUSTOM_AUTH: Custom authentication flow.    USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.     ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. This replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, Cognito receives the password in the request instead of using the SRP process to verify passwords.    ADMIN_NO_SRP_AUTH is not a valid value.
        public let authFlow: AuthFlowType
        /// The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:   For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.   For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.   For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY. To start the authentication flow with password verification, include ChallengeName: SRP_A and SRP_A: (The SRP_A Value).
        public let authParameters: [String: String]?
        /// The app client ID.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers. You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the InitiateAuth API action, Amazon Cognito invokes the AWS Lambda functions that are specified for various triggers. The ClientMetadata value is passed as input to the functions for only the following triggers:   Pre signup   Pre authentication   User migration   When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which the function receives as input. This payload contains a validationData attribute, which provides the data that you assigned to the ClientMetadata parameter in your InitiateAuth request. In your function code in AWS Lambda, you can process the validationData value to enhance your workflow for your specific needs. When you use the InitiateAuth API action, Amazon Cognito also invokes the functions for the following triggers, but it does not provide the ClientMetadata value as input:   Post authentication   Custom message   Pre token generation   Create auth challenge   Define auth challenge   Verify auth challenge   For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let userContextData: UserContextDataType?

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, authFlow: AuthFlowType, authParameters: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, userContextData: UserContextDataType? = nil) {
            self.analyticsMetadata = analyticsMetadata
            self.authFlow = authFlow
            self.authParameters = authParameters
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.userContextData = userContextData
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case authFlow = "AuthFlow"
            case authParameters = "AuthParameters"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case userContextData = "UserContextData"
        }
    }

    public struct InitiateAuthResponse: AWSDecodableShape {
        /// The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.
        public let authenticationResult: AuthenticationResultType?
        /// The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge. Valid values include the following. Note that all of these challenges require USERNAME and SECRET_HASH (if applicable) in the parameters.    SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.    PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.    DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.    DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.    NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.
        public let challengeName: ChallengeNameType?
        /// The challenge parameters. These are returned to you in the InitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (RespondToAuthChallenge).  All challenges require USERNAME and SECRET_HASH (if applicable).
        public let challengeParameters: [String: String]?
        /// The session which should be passed both ways in challenge-response calls to the service. If the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.
        public let session: String?

        public init(authenticationResult: AuthenticationResultType? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct LambdaConfigType: AWSEncodableShape & AWSDecodableShape {
        /// Creates an authentication challenge.
        public let createAuthChallenge: String?
        /// A custom email sender AWS Lambda trigger.
        public let customEmailSender: CustomEmailLambdaVersionConfigType?
        /// A custom Message AWS Lambda trigger.
        public let customMessage: String?
        /// A custom SMS sender AWS Lambda trigger.
        public let customSMSSender: CustomSMSLambdaVersionConfigType?
        /// Defines the authentication challenge.
        public let defineAuthChallenge: String?
        /// The Amazon Resource Name of Key Management Service Customer master keys . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to CustomEmailSender and CustomSMSSender.
        public let kMSKeyID: String?
        /// A post-authentication AWS Lambda trigger.
        public let postAuthentication: String?
        /// A post-confirmation AWS Lambda trigger.
        public let postConfirmation: String?
        /// A pre-authentication AWS Lambda trigger.
        public let preAuthentication: String?
        /// A pre-registration AWS Lambda trigger.
        public let preSignUp: String?
        /// A Lambda trigger that is invoked before token generation.
        public let preTokenGeneration: String?
        /// The user migration Lambda config type.
        public let userMigration: String?
        /// Verifies the authentication challenge response.
        public let verifyAuthChallengeResponse: String?

        public init(createAuthChallenge: String? = nil, customEmailSender: CustomEmailLambdaVersionConfigType? = nil, customMessage: String? = nil, customSMSSender: CustomSMSLambdaVersionConfigType? = nil, defineAuthChallenge: String? = nil, kMSKeyID: String? = nil, postAuthentication: String? = nil, postConfirmation: String? = nil, preAuthentication: String? = nil, preSignUp: String? = nil, preTokenGeneration: String? = nil, userMigration: String? = nil, verifyAuthChallengeResponse: String? = nil) {
            self.createAuthChallenge = createAuthChallenge
            self.customEmailSender = customEmailSender
            self.customMessage = customMessage
            self.customSMSSender = customSMSSender
            self.defineAuthChallenge = defineAuthChallenge
            self.kMSKeyID = kMSKeyID
            self.postAuthentication = postAuthentication
            self.postConfirmation = postConfirmation
            self.preAuthentication = preAuthentication
            self.preSignUp = preSignUp
            self.preTokenGeneration = preTokenGeneration
            self.userMigration = userMigration
            self.verifyAuthChallengeResponse = verifyAuthChallengeResponse
        }

        public func validate(name: String) throws {
            try self.validate(self.createAuthChallenge, name: "createAuthChallenge", parent: name, max: 2048)
            try self.validate(self.createAuthChallenge, name: "createAuthChallenge", parent: name, min: 20)
            try self.validate(self.createAuthChallenge, name: "createAuthChallenge", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.customEmailSender?.validate(name: "\(name).customEmailSender")
            try self.validate(self.customMessage, name: "customMessage", parent: name, max: 2048)
            try self.validate(self.customMessage, name: "customMessage", parent: name, min: 20)
            try self.validate(self.customMessage, name: "customMessage", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.customSMSSender?.validate(name: "\(name).customSMSSender")
            try self.validate(self.defineAuthChallenge, name: "defineAuthChallenge", parent: name, max: 2048)
            try self.validate(self.defineAuthChallenge, name: "defineAuthChallenge", parent: name, min: 20)
            try self.validate(self.defineAuthChallenge, name: "defineAuthChallenge", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.kMSKeyID, name: "kMSKeyID", parent: name, max: 2048)
            try self.validate(self.kMSKeyID, name: "kMSKeyID", parent: name, min: 20)
            try self.validate(self.kMSKeyID, name: "kMSKeyID", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.postAuthentication, name: "postAuthentication", parent: name, max: 2048)
            try self.validate(self.postAuthentication, name: "postAuthentication", parent: name, min: 20)
            try self.validate(self.postAuthentication, name: "postAuthentication", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.postConfirmation, name: "postConfirmation", parent: name, max: 2048)
            try self.validate(self.postConfirmation, name: "postConfirmation", parent: name, min: 20)
            try self.validate(self.postConfirmation, name: "postConfirmation", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.preAuthentication, name: "preAuthentication", parent: name, max: 2048)
            try self.validate(self.preAuthentication, name: "preAuthentication", parent: name, min: 20)
            try self.validate(self.preAuthentication, name: "preAuthentication", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.preSignUp, name: "preSignUp", parent: name, max: 2048)
            try self.validate(self.preSignUp, name: "preSignUp", parent: name, min: 20)
            try self.validate(self.preSignUp, name: "preSignUp", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.preTokenGeneration, name: "preTokenGeneration", parent: name, max: 2048)
            try self.validate(self.preTokenGeneration, name: "preTokenGeneration", parent: name, min: 20)
            try self.validate(self.preTokenGeneration, name: "preTokenGeneration", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.userMigration, name: "userMigration", parent: name, max: 2048)
            try self.validate(self.userMigration, name: "userMigration", parent: name, min: 20)
            try self.validate(self.userMigration, name: "userMigration", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.verifyAuthChallengeResponse, name: "verifyAuthChallengeResponse", parent: name, max: 2048)
            try self.validate(self.verifyAuthChallengeResponse, name: "verifyAuthChallengeResponse", parent: name, min: 20)
            try self.validate(self.verifyAuthChallengeResponse, name: "verifyAuthChallengeResponse", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case createAuthChallenge = "CreateAuthChallenge"
            case customEmailSender = "CustomEmailSender"
            case customMessage = "CustomMessage"
            case customSMSSender = "CustomSMSSender"
            case defineAuthChallenge = "DefineAuthChallenge"
            case kMSKeyID = "KMSKeyID"
            case postAuthentication = "PostAuthentication"
            case postConfirmation = "PostConfirmation"
            case preAuthentication = "PreAuthentication"
            case preSignUp = "PreSignUp"
            case preTokenGeneration = "PreTokenGeneration"
            case userMigration = "UserMigration"
            case verifyAuthChallengeResponse = "VerifyAuthChallengeResponse"
        }
    }

    public struct ListDevicesRequest: AWSEncodableShape {
        /// The access tokens for the request to list devices.
        public let accessToken: String
        /// The limit of the device request.
        public let limit: Int?
        /// The pagination token for the list request.
        public let paginationToken: String?

        public init(accessToken: String, limit: Int? = nil, paginationToken: String? = nil) {
            self.accessToken = accessToken
            self.limit = limit
            self.paginationToken = paginationToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "[\\S]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case limit = "Limit"
            case paginationToken = "PaginationToken"
        }
    }

    public struct ListDevicesResponse: AWSDecodableShape {
        /// The devices returned in the list devices response.
        public let devices: [DeviceType]?
        /// The pagination token for the list device response.
        public let paginationToken: String?

        public init(devices: [DeviceType]? = nil, paginationToken: String? = nil) {
            self.devices = devices
            self.paginationToken = paginationToken
        }

        private enum CodingKeys: String, CodingKey {
            case devices = "Devices"
            case paginationToken = "PaginationToken"
        }
    }

    public struct ListGroupsRequest: AWSEncodableShape {
        /// The limit of the request to list groups.
        public let limit: Int?
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(limit: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.limit = limit
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListGroupsResponse: AWSDecodableShape {
        /// The group objects for the groups.
        public let groups: [GroupType]?
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?

        public init(groups: [GroupType]? = nil, nextToken: String? = nil) {
            self.groups = groups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groups = "Groups"
            case nextToken = "NextToken"
        }
    }

    public struct ListIdentityProvidersRequest: AWSEncodableShape {
        /// The maximum number of identity providers to return.
        public let maxResults: Int?
        /// A pagination token.
        public let nextToken: String?
        /// The user pool ID.
        public let userPoolId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListIdentityProvidersResponse: AWSDecodableShape {
        /// A pagination token.
        public let nextToken: String?
        /// A list of identity provider objects.
        public let providers: [ProviderDescription]

        public init(nextToken: String? = nil, providers: [ProviderDescription]) {
            self.nextToken = nextToken
            self.providers = providers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case providers = "Providers"
        }
    }

    public struct ListResourceServersRequest: AWSEncodableShape {
        /// The maximum number of resource servers to return.
        public let maxResults: Int?
        /// A pagination token.
        public let nextToken: String?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListResourceServersResponse: AWSDecodableShape {
        /// A pagination token.
        public let nextToken: String?
        /// The resource servers.
        public let resourceServers: [ResourceServerType]

        public init(nextToken: String? = nil, resourceServers: [ResourceServerType]) {
            self.nextToken = nextToken
            self.resourceServers = resourceServers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resourceServers = "ResourceServers"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags that are assigned to the user pool.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListUserImportJobsRequest: AWSEncodableShape {
        /// The maximum number of import jobs you want the request to return.
        public let maxResults: Int
        /// An identifier that was returned from the previous call to ListUserImportJobs, which can be used to return the next set of import jobs in the list.
        public let paginationToken: String?
        /// The user pool ID for the user pool that the users are being imported into.
        public let userPoolId: String

        public init(maxResults: Int, paginationToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.paginationToken = paginationToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case paginationToken = "PaginationToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUserImportJobsResponse: AWSDecodableShape {
        /// An identifier that can be used to return the next set of user import jobs in the list.
        public let paginationToken: String?
        /// The user import jobs.
        public let userImportJobs: [UserImportJobType]?

        public init(paginationToken: String? = nil, userImportJobs: [UserImportJobType]? = nil) {
            self.paginationToken = paginationToken
            self.userImportJobs = userImportJobs
        }

        private enum CodingKeys: String, CodingKey {
            case paginationToken = "PaginationToken"
            case userImportJobs = "UserImportJobs"
        }
    }

    public struct ListUserPoolClientsRequest: AWSEncodableShape {
        /// The maximum number of results you want the request to return when listing the user pool clients.
        public let maxResults: Int?
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?
        /// The user pool ID for the user pool where you want to list user pool clients.
        public let userPoolId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUserPoolClientsResponse: AWSDecodableShape {
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?
        /// The user pool clients in the response that lists user pool clients.
        public let userPoolClients: [UserPoolClientDescription]?

        public init(nextToken: String? = nil, userPoolClients: [UserPoolClientDescription]? = nil) {
            self.nextToken = nextToken
            self.userPoolClients = userPoolClients
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case userPoolClients = "UserPoolClients"
        }
    }

    public struct ListUserPoolsRequest: AWSEncodableShape {
        /// The maximum number of results you want the request to return when listing the user pools.
        public let maxResults: Int
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?

        public init(maxResults: Int, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListUserPoolsResponse: AWSDecodableShape {
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?
        /// The user pools from the response to list users.
        public let userPools: [UserPoolDescriptionType]?

        public init(nextToken: String? = nil, userPools: [UserPoolDescriptionType]? = nil) {
            self.nextToken = nextToken
            self.userPools = userPools
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case userPools = "UserPools"
        }
    }

    public struct ListUsersInGroupRequest: AWSEncodableShape {
        /// The name of the group.
        public let groupName: String
        /// The limit of the request to list users.
        public let limit: Int?
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(groupName: String, limit: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.groupName = groupName
            self.limit = limit
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case limit = "Limit"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUsersInGroupResponse: AWSDecodableShape {
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let nextToken: String?
        /// The users returned in the request to list users.
        public let users: [UserType]?

        public init(nextToken: String? = nil, users: [UserType]? = nil) {
            self.nextToken = nextToken
            self.users = users
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case users = "Users"
        }
    }

    public struct ListUsersRequest: AWSEncodableShape {
        /// An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.
        public let attributesToGet: [String]?
        /// A filter string of the form "AttributeName Filter-Type "AttributeValue"". Quotation marks within the filter string must be escaped using the backslash (\) character. For example, "family_name = \"Reddy\"".    AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.    Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name ^= \"Jon\"".     AttributeValue: The attribute value that must be matched for each user.   If the filter string is empty, ListUsers returns all users in the user pool. You can only search for the following standard attributes:    username (case-sensitive)    email     phone_number     name     given_name     family_name     preferred_username     cognito:user_status (called Status in the Console) (case-insensitive)    status (called Enabled in the Console) (case-sensitive)     sub    Custom attributes are not searchable. For more information, see Searching for Users Using the ListUsers API and Examples of Using the ListUsers API in the Amazon Cognito Developer Guide.
        public let filter: String?
        /// Maximum number of users to be returned.
        public let limit: Int?
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let paginationToken: String?
        /// The user pool ID for the user pool on which the search should be performed.
        public let userPoolId: String

        public init(attributesToGet: [String]? = nil, filter: String? = nil, limit: Int? = nil, paginationToken: String? = nil, userPoolId: String) {
            self.attributesToGet = attributesToGet
            self.filter = filter
            self.limit = limit
            self.paginationToken = paginationToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.attributesToGet?.forEach {
                try validate($0, name: "attributesToGet[]", parent: name, max: 32)
                try validate($0, name: "attributesToGet[]", parent: name, min: 1)
                try validate($0, name: "attributesToGet[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.filter, name: "filter", parent: name, max: 256)
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "[\\S]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributesToGet = "AttributesToGet"
            case filter = "Filter"
            case limit = "Limit"
            case paginationToken = "PaginationToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUsersResponse: AWSDecodableShape {
        /// An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
        public let paginationToken: String?
        /// The users returned in the request to list users.
        public let users: [UserType]?

        public init(paginationToken: String? = nil, users: [UserType]? = nil) {
            self.paginationToken = paginationToken
            self.users = users
        }

        private enum CodingKeys: String, CodingKey {
            case paginationToken = "PaginationToken"
            case users = "Users"
        }
    }

    public struct MFAOptionType: AWSEncodableShape & AWSDecodableShape {
        /// The attribute name of the MFA option type. The only valid value is phone_number.
        public let attributeName: String?
        /// The delivery medium to send the MFA code. You can use this parameter to set only the SMS delivery medium value.
        public let deliveryMedium: DeliveryMediumType?

        public init(attributeName: String? = nil, deliveryMedium: DeliveryMediumType? = nil) {
            self.attributeName = attributeName
            self.deliveryMedium = deliveryMedium
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 32)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case deliveryMedium = "DeliveryMedium"
        }
    }

    public struct MessageTemplateType: AWSEncodableShape & AWSDecodableShape {
        /// The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.
        public let emailMessage: String?
        /// The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.
        public let emailSubject: String?
        /// The message template for SMS messages.
        public let sMSMessage: String?

        public init(emailMessage: String? = nil, emailSubject: String? = nil, sMSMessage: String? = nil) {
            self.emailMessage = emailMessage
            self.emailSubject = emailSubject
            self.sMSMessage = sMSMessage
        }

        public func validate(name: String) throws {
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, max: 20000)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, min: 6)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*")
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, max: 140)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, min: 1)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+")
            try self.validate(self.sMSMessage, name: "sMSMessage", parent: name, max: 140)
            try self.validate(self.sMSMessage, name: "sMSMessage", parent: name, min: 6)
            try self.validate(self.sMSMessage, name: "sMSMessage", parent: name, pattern: ".*\\{####\\}.*")
        }

        private enum CodingKeys: String, CodingKey {
            case emailMessage = "EmailMessage"
            case emailSubject = "EmailSubject"
            case sMSMessage = "SMSMessage"
        }
    }

    public struct NewDeviceMetadataType: AWSDecodableShape {
        /// The device group key.
        public let deviceGroupKey: String?
        /// The device key.
        public let deviceKey: String?

        public init(deviceGroupKey: String? = nil, deviceKey: String? = nil) {
            self.deviceGroupKey = deviceGroupKey
            self.deviceKey = deviceKey
        }

        private enum CodingKeys: String, CodingKey {
            case deviceGroupKey = "DeviceGroupKey"
            case deviceKey = "DeviceKey"
        }
    }

    public struct NotifyConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Email template used when a detected risk event is blocked.
        public let blockEmail: NotifyEmailType?
        /// The email address that is sending the email. It must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.
        public let from: String?
        /// The MFA email template used when MFA is challenged as part of a detected risk.
        public let mfaEmail: NotifyEmailType?
        /// The email template used when a detected risk event is allowed.
        public let noActionEmail: NotifyEmailType?
        /// The destination to which the receiver of an email should reply to.
        public let replyTo: String?
        /// The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. It permits Amazon Cognito to send for the email address specified in the From parameter.
        public let sourceArn: String

        public init(blockEmail: NotifyEmailType? = nil, from: String? = nil, mfaEmail: NotifyEmailType? = nil, noActionEmail: NotifyEmailType? = nil, replyTo: String? = nil, sourceArn: String) {
            self.blockEmail = blockEmail
            self.from = from
            self.mfaEmail = mfaEmail
            self.noActionEmail = noActionEmail
            self.replyTo = replyTo
            self.sourceArn = sourceArn
        }

        public func validate(name: String) throws {
            try self.blockEmail?.validate(name: "\(name).blockEmail")
            try self.mfaEmail?.validate(name: "\(name).mfaEmail")
            try self.noActionEmail?.validate(name: "\(name).noActionEmail")
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, max: 2048)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, min: 20)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case blockEmail = "BlockEmail"
            case from = "From"
            case mfaEmail = "MfaEmail"
            case noActionEmail = "NoActionEmail"
            case replyTo = "ReplyTo"
            case sourceArn = "SourceArn"
        }
    }

    public struct NotifyEmailType: AWSEncodableShape & AWSDecodableShape {
        /// The HTML body.
        public let htmlBody: String?
        /// The subject.
        public let subject: String
        /// The text body.
        public let textBody: String?

        public init(htmlBody: String? = nil, subject: String, textBody: String? = nil) {
            self.htmlBody = htmlBody
            self.subject = subject
            self.textBody = textBody
        }

        public func validate(name: String) throws {
            try self.validate(self.htmlBody, name: "htmlBody", parent: name, max: 20000)
            try self.validate(self.htmlBody, name: "htmlBody", parent: name, min: 6)
            try self.validate(self.htmlBody, name: "htmlBody", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]+")
            try self.validate(self.subject, name: "subject", parent: name, max: 140)
            try self.validate(self.subject, name: "subject", parent: name, min: 1)
            try self.validate(self.subject, name: "subject", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+")
            try self.validate(self.textBody, name: "textBody", parent: name, max: 20000)
            try self.validate(self.textBody, name: "textBody", parent: name, min: 6)
            try self.validate(self.textBody, name: "textBody", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]+")
        }

        private enum CodingKeys: String, CodingKey {
            case htmlBody = "HtmlBody"
            case subject = "Subject"
            case textBody = "TextBody"
        }
    }

    public struct NumberAttributeConstraintsType: AWSEncodableShape & AWSDecodableShape {
        /// The maximum value of an attribute that is of the number data type.
        public let maxValue: String?
        /// The minimum value of an attribute that is of the number data type.
        public let minValue: String?

        public init(maxValue: String? = nil, minValue: String? = nil) {
            self.maxValue = maxValue
            self.minValue = minValue
        }

        private enum CodingKeys: String, CodingKey {
            case maxValue = "MaxValue"
            case minValue = "MinValue"
        }
    }

    public struct PasswordPolicyType: AWSEncodableShape & AWSDecodableShape {
        /// The minimum length of the password policy that you have set. Cannot be less than 6.
        public let minimumLength: Int?
        /// In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.
        public let requireLowercase: Bool?
        /// In the password policy that you have set, refers to whether you have required users to use at least one number in their password.
        public let requireNumbers: Bool?
        /// In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.
        public let requireSymbols: Bool?
        /// In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.
        public let requireUppercase: Bool?
        /// In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.  When you set TemporaryPasswordValidityDays for a user pool, you will no longer be able to set the deprecated UnusedAccountValidityDays value for that user pool.
        public let temporaryPasswordValidityDays: Int?

        public init(minimumLength: Int? = nil, requireLowercase: Bool? = nil, requireNumbers: Bool? = nil, requireSymbols: Bool? = nil, requireUppercase: Bool? = nil, temporaryPasswordValidityDays: Int? = nil) {
            self.minimumLength = minimumLength
            self.requireLowercase = requireLowercase
            self.requireNumbers = requireNumbers
            self.requireSymbols = requireSymbols
            self.requireUppercase = requireUppercase
            self.temporaryPasswordValidityDays = temporaryPasswordValidityDays
        }

        public func validate(name: String) throws {
            try self.validate(self.minimumLength, name: "minimumLength", parent: name, max: 99)
            try self.validate(self.minimumLength, name: "minimumLength", parent: name, min: 6)
            try self.validate(self.temporaryPasswordValidityDays, name: "temporaryPasswordValidityDays", parent: name, max: 365)
            try self.validate(self.temporaryPasswordValidityDays, name: "temporaryPasswordValidityDays", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case minimumLength = "MinimumLength"
            case requireLowercase = "RequireLowercase"
            case requireNumbers = "RequireNumbers"
            case requireSymbols = "RequireSymbols"
            case requireUppercase = "RequireUppercase"
            case temporaryPasswordValidityDays = "TemporaryPasswordValidityDays"
        }
    }

    public struct ProviderDescription: AWSDecodableShape {
        /// The date the provider was added to the user pool.
        public let creationDate: Date?
        /// The date the provider was last modified.
        public let lastModifiedDate: Date?
        /// The identity provider name.
        public let providerName: String?
        /// The identity provider type.
        public let providerType: IdentityProviderTypeType?

        public init(creationDate: Date? = nil, lastModifiedDate: Date? = nil, providerName: String? = nil, providerType: IdentityProviderTypeType? = nil) {
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.providerName = providerName
            self.providerType = providerType
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case lastModifiedDate = "LastModifiedDate"
            case providerName = "ProviderName"
            case providerType = "ProviderType"
        }
    }

    public struct ProviderUserIdentifierType: AWSEncodableShape {
        /// The name of the provider attribute to link to, for example, NameID.
        public let providerAttributeName: String?
        /// The value of the provider attribute to link to, for example, xxxxx_account.
        public let providerAttributeValue: String?
        /// The name of the provider, for example, Facebook, Google, or Login with Amazon.
        public let providerName: String?

        public init(providerAttributeName: String? = nil, providerAttributeValue: String? = nil, providerName: String? = nil) {
            self.providerAttributeName = providerAttributeName
            self.providerAttributeValue = providerAttributeValue
            self.providerName = providerName
        }

        public func validate(name: String) throws {
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case providerAttributeName = "ProviderAttributeName"
            case providerAttributeValue = "ProviderAttributeValue"
            case providerName = "ProviderName"
        }
    }

    public struct RecoveryOptionType: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the recovery method for a user.
        public let name: RecoveryOptionNameType
        /// A positive integer specifying priority of a method with 1 being the highest priority.
        public let priority: Int

        public init(name: RecoveryOptionNameType, priority: Int) {
            self.name = name
            self.priority = priority
        }

        public func validate(name: String) throws {
            try self.validate(self.priority, name: "priority", parent: name, max: 2)
            try self.validate(self.priority, name: "priority", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case priority = "Priority"
        }
    }

    public struct ResendConfirmationCodeRequest: AWSEncodableShape {
        /// The Amazon Pinpoint analytics metadata for collecting metrics for ResendConfirmationCode calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the client associated with the user pool.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ResendConfirmationCode API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ResendConfirmationCode request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.
        public let secretHash: String?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let userContextData: UserContextDataType?
        /// The user name of the user to whom you wish to resend a confirmation code.
        public let username: String

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, secretHash: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.secretHash = secretHash
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "[\\w+=/]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case secretHash = "SecretHash"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ResendConfirmationCodeResponse: AWSDecodableShape {
        /// The code delivery details returned by the server in response to the request to resend the confirmation code.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?

        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil) {
            self.codeDeliveryDetails = codeDeliveryDetails
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
        }
    }

    public struct ResourceServerScopeType: AWSEncodableShape & AWSDecodableShape {
        /// A description of the scope.
        public let scopeDescription: String
        /// The name of the scope.
        public let scopeName: String

        public init(scopeDescription: String, scopeName: String) {
            self.scopeDescription = scopeDescription
            self.scopeName = scopeName
        }

        public func validate(name: String) throws {
            try self.validate(self.scopeDescription, name: "scopeDescription", parent: name, max: 256)
            try self.validate(self.scopeDescription, name: "scopeDescription", parent: name, min: 1)
            try self.validate(self.scopeName, name: "scopeName", parent: name, max: 256)
            try self.validate(self.scopeName, name: "scopeName", parent: name, min: 1)
            try self.validate(self.scopeName, name: "scopeName", parent: name, pattern: "[\\x21\\x23-\\x2E\\x30-\\x5B\\x5D-\\x7E]+")
        }

        private enum CodingKeys: String, CodingKey {
            case scopeDescription = "ScopeDescription"
            case scopeName = "ScopeName"
        }
    }

    public struct ResourceServerType: AWSDecodableShape {
        /// The identifier for the resource server.
        public let identifier: String?
        /// The name of the resource server.
        public let name: String?
        /// A list of scopes that are defined for the resource server.
        public let scopes: [ResourceServerScopeType]?
        /// The user pool ID for the user pool that hosts the resource server.
        public let userPoolId: String?

        public init(identifier: String? = nil, name: String? = nil, scopes: [ResourceServerScopeType]? = nil, userPoolId: String? = nil) {
            self.identifier = identifier
            self.name = name
            self.scopes = scopes
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case name = "Name"
            case scopes = "Scopes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct RespondToAuthChallengeRequest: AWSEncodableShape {
        /// The Amazon Pinpoint analytics metadata for collecting metrics for RespondToAuthChallenge calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The challenge name. For more information, see InitiateAuth.  ADMIN_NO_SRP_AUTH is not a valid value.
        public let challengeName: ChallengeNameType
        /// The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:   SECRET_HASH (if app client is configured with client secret) applies to all inputs below (including SOFTWARE_TOKEN_MFA).     SMS_MFA: SMS_MFA_CODE, USERNAME.    PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME.    NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME.     SOFTWARE_TOKEN_MFA: USERNAME and SOFTWARE_TOKEN_MFA_CODE are required attributes.    DEVICE_SRP_AUTH requires USERNAME, DEVICE_KEY, SRP_A (and SECRET_HASH).    DEVICE_PASSWORD_VERIFIER requires everything that PASSWORD_VERIFIER requires plus DEVICE_KEY.
        public let challengeResponses: [String: String]?
        /// The app client ID.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the RespondToAuthChallenge API action, Amazon Cognito invokes any functions that are assigned to the following triggers: post authentication, pre token generation, define auth challenge, create auth challenge, and verify auth challenge. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your RespondToAuthChallenge request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.
        public let session: String?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let userContextData: UserContextDataType?

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, challengeName: ChallengeNameType, challengeResponses: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, session: String? = nil, userContextData: UserContextDataType? = nil) {
            self.analyticsMetadata = analyticsMetadata
            self.challengeName = challengeName
            self.challengeResponses = challengeResponses
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.session = session
            self.userContextData = userContextData
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case challengeName = "ChallengeName"
            case challengeResponses = "ChallengeResponses"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case session = "Session"
            case userContextData = "UserContextData"
        }
    }

    public struct RespondToAuthChallengeResponse: AWSDecodableShape {
        /// The result returned by the server in response to the request to respond to the authentication challenge.
        public let authenticationResult: AuthenticationResultType?
        /// The challenge name. For more information, see InitiateAuth.
        public let challengeName: ChallengeNameType?
        /// The challenge parameters. For more information, see InitiateAuth.
        public let challengeParameters: [String: String]?
        /// The session which should be passed both ways in challenge-response calls to the service. If the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.
        public let session: String?

        public init(authenticationResult: AuthenticationResultType? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct RiskConfigurationType: AWSDecodableShape {
        /// The account takeover risk configuration object including the NotifyConfiguration object and Actions to take in the case of an account takeover.
        public let accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType?
        /// The app client ID.
        public let clientId: String?
        /// The compromised credentials risk configuration object including the EventFilter and the EventAction
        public let compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType?
        /// The last modified date.
        public let lastModifiedDate: Date?
        /// The configuration to override the risk decision.
        public let riskExceptionConfiguration: RiskExceptionConfigurationType?
        /// The user pool ID.
        public let userPoolId: String?

        public init(accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType? = nil, clientId: String? = nil, compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType? = nil, lastModifiedDate: Date? = nil, riskExceptionConfiguration: RiskExceptionConfigurationType? = nil, userPoolId: String? = nil) {
            self.accountTakeoverRiskConfiguration = accountTakeoverRiskConfiguration
            self.clientId = clientId
            self.compromisedCredentialsRiskConfiguration = compromisedCredentialsRiskConfiguration
            self.lastModifiedDate = lastModifiedDate
            self.riskExceptionConfiguration = riskExceptionConfiguration
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case accountTakeoverRiskConfiguration = "AccountTakeoverRiskConfiguration"
            case clientId = "ClientId"
            case compromisedCredentialsRiskConfiguration = "CompromisedCredentialsRiskConfiguration"
            case lastModifiedDate = "LastModifiedDate"
            case riskExceptionConfiguration = "RiskExceptionConfiguration"
            case userPoolId = "UserPoolId"
        }
    }

    public struct RiskExceptionConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Overrides the risk decision to always block the pre-authentication requests. The IP range is in CIDR notation: a compact representation of an IP address and its associated routing prefix.
        public let blockedIPRangeList: [String]?
        /// Risk detection is not performed on the IP addresses in the range list. The IP range is in CIDR notation.
        public let skippedIPRangeList: [String]?

        public init(blockedIPRangeList: [String]? = nil, skippedIPRangeList: [String]? = nil) {
            self.blockedIPRangeList = blockedIPRangeList
            self.skippedIPRangeList = skippedIPRangeList
        }

        public func validate(name: String) throws {
            try self.validate(self.blockedIPRangeList, name: "blockedIPRangeList", parent: name, max: 20)
            try self.validate(self.skippedIPRangeList, name: "skippedIPRangeList", parent: name, max: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case blockedIPRangeList = "BlockedIPRangeList"
            case skippedIPRangeList = "SkippedIPRangeList"
        }
    }

    public struct SMSMfaSettingsType: AWSEncodableShape {
        /// Specifies whether SMS text message MFA is enabled. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, unless device tracking is turned on and the device has been trusted.
        public let enabled: Bool?
        /// Specifies whether SMS is the preferred MFA method.
        public let preferredMfa: Bool?

        public init(enabled: Bool? = nil, preferredMfa: Bool? = nil) {
            self.enabled = enabled
            self.preferredMfa = preferredMfa
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case preferredMfa = "PreferredMfa"
        }
    }

    public struct SchemaAttributeType: AWSEncodableShape & AWSDecodableShape {
        /// The attribute data type.
        public let attributeDataType: AttributeDataType?
        ///  We recommend that you use WriteAttributes in the user pool client to control how attributes can be mutated for new use cases instead of using DeveloperOnlyAttribute.  Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token. For example, DeveloperOnlyAttribute can be modified using AdminUpdateUserAttributes but cannot be updated using UpdateUserAttributes.
        public let developerOnlyAttribute: Bool?
        /// Specifies whether the value of the attribute can be changed. For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.
        public let mutable: Bool?
        /// A schema attribute of the name type.
        public let name: String?
        /// Specifies the constraints for an attribute of the number type.
        public let numberAttributeConstraints: NumberAttributeConstraintsType?
        /// Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.
        public let required: Bool?
        /// Specifies the constraints for an attribute of the string type.
        public let stringAttributeConstraints: StringAttributeConstraintsType?

        public init(attributeDataType: AttributeDataType? = nil, developerOnlyAttribute: Bool? = nil, mutable: Bool? = nil, name: String? = nil, numberAttributeConstraints: NumberAttributeConstraintsType? = nil, required: Bool? = nil, stringAttributeConstraints: StringAttributeConstraintsType? = nil) {
            self.attributeDataType = attributeDataType
            self.developerOnlyAttribute = developerOnlyAttribute
            self.mutable = mutable
            self.name = name
            self.numberAttributeConstraints = numberAttributeConstraints
            self.required = required
            self.stringAttributeConstraints = stringAttributeConstraints
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 20)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeDataType = "AttributeDataType"
            case developerOnlyAttribute = "DeveloperOnlyAttribute"
            case mutable = "Mutable"
            case name = "Name"
            case numberAttributeConstraints = "NumberAttributeConstraints"
            case required = "Required"
            case stringAttributeConstraints = "StringAttributeConstraints"
        }
    }

    public struct SetRiskConfigurationRequest: AWSEncodableShape {
        /// The account takeover risk configuration.
        public let accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType?
        /// The app client ID. If ClientId is null, then the risk configuration is mapped to userPoolId. When the client ID is null, the same risk configuration is applied to all the clients in the userPool. Otherwise, ClientId is mapped to the client. When the client ID is not null, the user pool configuration is overridden and the risk configuration for the client is used instead.
        public let clientId: String?
        /// The compromised credentials risk configuration.
        public let compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType?
        /// The configuration to override the risk decision.
        public let riskExceptionConfiguration: RiskExceptionConfigurationType?
        /// The user pool ID.
        public let userPoolId: String

        public init(accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType? = nil, clientId: String? = nil, compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType? = nil, riskExceptionConfiguration: RiskExceptionConfigurationType? = nil, userPoolId: String) {
            self.accountTakeoverRiskConfiguration = accountTakeoverRiskConfiguration
            self.clientId = clientId
            self.compromisedCredentialsRiskConfiguration = compromisedCredentialsRiskConfiguration
            self.riskExceptionConfiguration = riskExceptionConfiguration
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.accountTakeoverRiskConfiguration?.validate(name: "\(name).accountTakeoverRiskConfiguration")
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.riskExceptionConfiguration?.validate(name: "\(name).riskExceptionConfiguration")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accountTakeoverRiskConfiguration = "AccountTakeoverRiskConfiguration"
            case clientId = "ClientId"
            case compromisedCredentialsRiskConfiguration = "CompromisedCredentialsRiskConfiguration"
            case riskExceptionConfiguration = "RiskExceptionConfiguration"
            case userPoolId = "UserPoolId"
        }
    }

    public struct SetRiskConfigurationResponse: AWSDecodableShape {
        /// The risk configuration.
        public let riskConfiguration: RiskConfigurationType

        public init(riskConfiguration: RiskConfigurationType) {
            self.riskConfiguration = riskConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case riskConfiguration = "RiskConfiguration"
        }
    }

    public struct SetUICustomizationRequest: AWSEncodableShape {
        /// The client ID for the client app.
        public let clientId: String?
        /// The CSS values in the UI customization.
        public let css: String?
        /// The uploaded logo image for the UI customization.
        public let imageFile: Data?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(clientId: String? = nil, css: String? = nil, imageFile: Data? = nil, userPoolId: String) {
            self.clientId = clientId
            self.css = css
            self.imageFile = imageFile
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case css = "CSS"
            case imageFile = "ImageFile"
            case userPoolId = "UserPoolId"
        }
    }

    public struct SetUICustomizationResponse: AWSDecodableShape {
        /// The UI customization information.
        public let uICustomization: UICustomizationType

        public init(uICustomization: UICustomizationType) {
            self.uICustomization = uICustomization
        }

        private enum CodingKeys: String, CodingKey {
            case uICustomization = "UICustomization"
        }
    }

    public struct SetUserMFAPreferenceRequest: AWSEncodableShape {
        /// The access token for the user.
        public let accessToken: String
        /// The SMS text message multi-factor authentication (MFA) settings.
        public let sMSMfaSettings: SMSMfaSettingsType?
        /// The time-based one-time password software token MFA settings.
        public let softwareTokenMfaSettings: SoftwareTokenMfaSettingsType?

        public init(accessToken: String, sMSMfaSettings: SMSMfaSettingsType? = nil, softwareTokenMfaSettings: SoftwareTokenMfaSettingsType? = nil) {
            self.accessToken = accessToken
            self.sMSMfaSettings = sMSMfaSettings
            self.softwareTokenMfaSettings = softwareTokenMfaSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case sMSMfaSettings = "SMSMfaSettings"
            case softwareTokenMfaSettings = "SoftwareTokenMfaSettings"
        }
    }

    public struct SetUserMFAPreferenceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct SetUserPoolMfaConfigRequest: AWSEncodableShape {
        /// The MFA configuration. Valid values include:    OFF MFA will not be used for any users.    ON MFA is required for all users to sign in.    OPTIONAL MFA will be required only for individual users who have an MFA factor enabled.
        public let mfaConfiguration: UserPoolMfaType?
        /// The SMS text message MFA configuration.
        public let smsMfaConfiguration: SmsMfaConfigType?
        /// The software token MFA configuration.
        public let softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType?
        /// The user pool ID.
        public let userPoolId: String

        public init(mfaConfiguration: UserPoolMfaType? = nil, smsMfaConfiguration: SmsMfaConfigType? = nil, softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType? = nil, userPoolId: String) {
            self.mfaConfiguration = mfaConfiguration
            self.smsMfaConfiguration = smsMfaConfiguration
            self.softwareTokenMfaConfiguration = softwareTokenMfaConfiguration
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.smsMfaConfiguration?.validate(name: "\(name).smsMfaConfiguration")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case mfaConfiguration = "MfaConfiguration"
            case smsMfaConfiguration = "SmsMfaConfiguration"
            case softwareTokenMfaConfiguration = "SoftwareTokenMfaConfiguration"
            case userPoolId = "UserPoolId"
        }
    }

    public struct SetUserPoolMfaConfigResponse: AWSDecodableShape {
        /// The MFA configuration. Valid values include:    OFF MFA will not be used for any users.    ON MFA is required for all users to sign in.    OPTIONAL MFA will be required only for individual users who have an MFA factor enabled.
        public let mfaConfiguration: UserPoolMfaType?
        /// The SMS text message MFA configuration.
        public let smsMfaConfiguration: SmsMfaConfigType?
        /// The software token MFA configuration.
        public let softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType?

        public init(mfaConfiguration: UserPoolMfaType? = nil, smsMfaConfiguration: SmsMfaConfigType? = nil, softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType? = nil) {
            self.mfaConfiguration = mfaConfiguration
            self.smsMfaConfiguration = smsMfaConfiguration
            self.softwareTokenMfaConfiguration = softwareTokenMfaConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case mfaConfiguration = "MfaConfiguration"
            case smsMfaConfiguration = "SmsMfaConfiguration"
            case softwareTokenMfaConfiguration = "SoftwareTokenMfaConfiguration"
        }
    }

    public struct SetUserSettingsRequest: AWSEncodableShape {
        /// The access token for the set user settings request.
        public let accessToken: String
        /// You can use this parameter only to set an SMS configuration that uses SMS for delivery.
        public let mFAOptions: [MFAOptionType]

        public init(accessToken: String, mFAOptions: [MFAOptionType]) {
            self.accessToken = accessToken
            self.mFAOptions = mFAOptions
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.mFAOptions.forEach {
                try $0.validate(name: "\(name).mFAOptions[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case mFAOptions = "MFAOptions"
        }
    }

    public struct SetUserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct SignUpRequest: AWSEncodableShape {
        /// The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the client associated with the user pool.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// The password of the user you wish to register.
        public let password: String
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.
        public let secretHash: String?
        /// An array of name-value pairs representing user attributes. For custom attributes, you must prepend the custom: prefix to the attribute name.
        public let userAttributes: [AttributeType]?
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let userContextData: UserContextDataType?
        /// The user name of the user you wish to register.
        public let username: String
        /// The validation data in the request to register a user.
        public let validationData: [AttributeType]?

        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, password: String, secretHash: String? = nil, userAttributes: [AttributeType]? = nil, userContextData: UserContextDataType? = nil, username: String, validationData: [AttributeType]? = nil) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.password = password
            self.secretHash = secretHash
            self.userAttributes = userAttributes
            self.userContextData = userContextData
            self.username = username
            self.validationData = validationData
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.password, name: "password", parent: name, max: 256)
            try self.validate(self.password, name: "password", parent: name, min: 6)
            try self.validate(self.password, name: "password", parent: name, pattern: "[\\S]+")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "[\\w+=/]+")
            try self.userAttributes?.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validationData?.forEach {
                try $0.validate(name: "\(name).validationData[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case password = "Password"
            case secretHash = "SecretHash"
            case userAttributes = "UserAttributes"
            case userContextData = "UserContextData"
            case username = "Username"
            case validationData = "ValidationData"
        }
    }

    public struct SignUpResponse: AWSDecodableShape {
        /// The code delivery details returned by the server response to the user registration request.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?
        /// A response from the server indicating that a user registration has been confirmed.
        public let userConfirmed: Bool
        /// The UUID of the authenticated user. This is not the same as username.
        public let userSub: String

        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil, userConfirmed: Bool, userSub: String) {
            self.codeDeliveryDetails = codeDeliveryDetails
            self.userConfirmed = userConfirmed
            self.userSub = userSub
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
            case userConfirmed = "UserConfirmed"
            case userSub = "UserSub"
        }
    }

    public struct SmsConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The external ID is a value that we recommend you use to add security to your IAM role which is used to call Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, the Cognito User Pool will include it when attempting to assume your IAM role, so that you can set your roles trust policy to require the ExternalID. If you use the Cognito Management Console to create a role for SMS MFA, Cognito will create a role with the required permissions and a trust policy that demonstrates use of the ExternalId.
        public let externalId: String?
        /// The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller. This is the ARN of the IAM role in your AWS account which Cognito will use to send SMS messages. SMS messages are subject to a spending limit.
        public let snsCallerArn: String

        public init(externalId: String? = nil, snsCallerArn: String) {
            self.externalId = externalId
            self.snsCallerArn = snsCallerArn
        }

        public func validate(name: String) throws {
            try self.validate(self.snsCallerArn, name: "snsCallerArn", parent: name, max: 2048)
            try self.validate(self.snsCallerArn, name: "snsCallerArn", parent: name, min: 20)
            try self.validate(self.snsCallerArn, name: "snsCallerArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
        }

        private enum CodingKeys: String, CodingKey {
            case externalId = "ExternalId"
            case snsCallerArn = "SnsCallerArn"
        }
    }

    public struct SmsMfaConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The SMS authentication message that will be sent to users with the code they need to sign in. The message must contain the ‘{####}’ placeholder, which will be replaced with the code. If the message is not included, and default message will be used.
        public let smsAuthenticationMessage: String?
        /// The SMS configuration.
        public let smsConfiguration: SmsConfigurationType?

        public init(smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil) {
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, max: 140)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, min: 6)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, pattern: ".*\\{####\\}.*")
            try self.smsConfiguration?.validate(name: "\(name).smsConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
        }
    }

    public struct SoftwareTokenMfaConfigType: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether software token MFA is enabled.
        public let enabled: Bool?

        public init(enabled: Bool? = nil) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
        }
    }

    public struct SoftwareTokenMfaSettingsType: AWSEncodableShape {
        /// Specifies whether software token MFA is enabled. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, unless device tracking is turned on and the device has been trusted.
        public let enabled: Bool?
        /// Specifies whether software token MFA is the preferred MFA method.
        public let preferredMfa: Bool?

        public init(enabled: Bool? = nil, preferredMfa: Bool? = nil) {
            self.enabled = enabled
            self.preferredMfa = preferredMfa
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case preferredMfa = "PreferredMfa"
        }
    }

    public struct StartUserImportJobRequest: AWSEncodableShape {
        /// The job ID for the user import job.
        public let jobId: String
        /// The user pool ID for the user pool that the users are being imported into.
        public let userPoolId: String

        public init(jobId: String, userPoolId: String) {
            self.jobId = jobId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 55)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "import-[0-9a-zA-Z-]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct StartUserImportJobResponse: AWSDecodableShape {
        /// The job object that represents the user import job.
        public let userImportJob: UserImportJobType?

        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct StopUserImportJobRequest: AWSEncodableShape {
        /// The job ID for the user import job.
        public let jobId: String
        /// The user pool ID for the user pool that the users are being imported into.
        public let userPoolId: String

        public init(jobId: String, userPoolId: String) {
            self.jobId = jobId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 55)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "import-[0-9a-zA-Z-]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct StopUserImportJobResponse: AWSDecodableShape {
        /// The job object that represents the user import job.
        public let userImportJob: UserImportJobType?

        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct StringAttributeConstraintsType: AWSEncodableShape & AWSDecodableShape {
        /// The maximum length.
        public let maxLength: String?
        /// The minimum length.
        public let minLength: String?

        public init(maxLength: String? = nil, minLength: String? = nil) {
            self.maxLength = maxLength
            self.minLength = minLength
        }

        private enum CodingKeys: String, CodingKey {
            case maxLength = "MaxLength"
            case minLength = "MinLength"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user pool to assign the tags to.
        public let resourceArn: String
        /// The tags to assign to the user pool.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, min: 0)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TokenValidityUnitsType: AWSEncodableShape & AWSDecodableShape {
        ///  A time unit in “seconds”, “minutes”, “hours” or “days” for the value in AccessTokenValidity, defaults to hours.
        public let accessToken: TimeUnitsType?
        /// A time unit in “seconds”, “minutes”, “hours” or “days” for the value in IdTokenValidity, defaults to hours.
        public let idToken: TimeUnitsType?
        /// A time unit in “seconds”, “minutes”, “hours” or “days” for the value in RefreshTokenValidity, defaults to days.
        public let refreshToken: TimeUnitsType?

        public init(accessToken: TimeUnitsType? = nil, idToken: TimeUnitsType? = nil, refreshToken: TimeUnitsType? = nil) {
            self.accessToken = accessToken
            self.idToken = idToken
            self.refreshToken = refreshToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case idToken = "IdToken"
            case refreshToken = "RefreshToken"
        }
    }

    public struct UICustomizationType: AWSDecodableShape {
        /// The client ID for the client app.
        public let clientId: String?
        /// The creation date for the UI customization.
        public let creationDate: Date?
        /// The CSS values in the UI customization.
        public let css: String?
        /// The CSS version number.
        public let cSSVersion: String?
        /// The logo image for the UI customization.
        public let imageUrl: String?
        /// The last-modified date for the UI customization.
        public let lastModifiedDate: Date?
        /// The user pool ID for the user pool.
        public let userPoolId: String?

        public init(clientId: String? = nil, creationDate: Date? = nil, css: String? = nil, cSSVersion: String? = nil, imageUrl: String? = nil, lastModifiedDate: Date? = nil, userPoolId: String? = nil) {
            self.clientId = clientId
            self.creationDate = creationDate
            self.css = css
            self.cSSVersion = cSSVersion
            self.imageUrl = imageUrl
            self.lastModifiedDate = lastModifiedDate
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case creationDate = "CreationDate"
            case css = "CSS"
            case cSSVersion = "CSSVersion"
            case imageUrl = "ImageUrl"
            case lastModifiedDate = "LastModifiedDate"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.
        public let resourceArn: String
        /// The keys of the tags to remove from the user pool.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAuthEventFeedbackRequest: AWSEncodableShape {
        /// The event ID.
        public let eventId: String
        /// The feedback token.
        public let feedbackToken: String
        /// The authentication event feedback value.
        public let feedbackValue: FeedbackValueType
        /// The user pool username.
        public let username: String
        /// The user pool ID.
        public let userPoolId: String

        public init(eventId: String, feedbackToken: String, feedbackValue: FeedbackValueType, username: String, userPoolId: String) {
            self.eventId = eventId
            self.feedbackToken = feedbackToken
            self.feedbackValue = feedbackValue
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.eventId, name: "eventId", parent: name, max: 50)
            try self.validate(self.eventId, name: "eventId", parent: name, min: 1)
            try self.validate(self.eventId, name: "eventId", parent: name, pattern: "[\\w+-]+")
            try self.validate(self.feedbackToken, name: "feedbackToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case eventId = "EventId"
            case feedbackToken = "FeedbackToken"
            case feedbackValue = "FeedbackValue"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateAuthEventFeedbackResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateDeviceStatusRequest: AWSEncodableShape {
        /// The access token.
        public let accessToken: String
        /// The device key.
        public let deviceKey: String
        /// The status of whether a device is remembered.
        public let deviceRememberedStatus: DeviceRememberedStatusType?

        public init(accessToken: String, deviceKey: String, deviceRememberedStatus: DeviceRememberedStatusType? = nil) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
            self.deviceRememberedStatus = deviceRememberedStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "[\\w-]+_[0-9a-f-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
            case deviceRememberedStatus = "DeviceRememberedStatus"
        }
    }

    public struct UpdateDeviceStatusResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateGroupRequest: AWSEncodableShape {
        /// A string containing the new description of the group.
        public let description: String?
        /// The name of the group.
        public let groupName: String
        /// The new precedence value for the group. For more information about this parameter, see CreateGroup.
        public let precedence: Int?
        /// The new role ARN for the group. This is used for setting the cognito:roles and cognito:preferred_role claims in the token.
        public let roleArn: String?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(description: String? = nil, groupName: String, precedence: Int? = nil, roleArn: String? = nil, userPoolId: String) {
            self.description = description
            self.groupName = groupName
            self.precedence = precedence
            self.roleArn = roleArn
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2048)
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.precedence, name: "precedence", parent: name, min: 0)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case groupName = "GroupName"
            case precedence = "Precedence"
            case roleArn = "RoleArn"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateGroupResponse: AWSDecodableShape {
        /// The group object for the group.
        public let group: GroupType?

        public init(group: GroupType? = nil) {
            self.group = group
        }

        private enum CodingKeys: String, CodingKey {
            case group = "Group"
        }
    }

    public struct UpdateIdentityProviderRequest: AWSEncodableShape {
        /// The identity provider attribute mapping to be changed.
        public let attributeMapping: [String: String]?
        /// A list of identity provider identifiers.
        public let idpIdentifiers: [String]?
        /// The identity provider details to be updated, such as MetadataURL and MetadataFile.
        public let providerDetails: [String: String]?
        /// The identity provider name.
        public let providerName: String
        /// The user pool ID.
        public let userPoolId: String

        public init(attributeMapping: [String: String]? = nil, idpIdentifiers: [String]? = nil, providerDetails: [String: String]? = nil, providerName: String, userPoolId: String) {
            self.attributeMapping = attributeMapping
            self.idpIdentifiers = idpIdentifiers
            self.providerDetails = providerDetails
            self.providerName = providerName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.attributeMapping?.forEach {
                try validate($0.key, name: "attributeMapping.key", parent: name, max: 32)
                try validate($0.key, name: "attributeMapping.key", parent: name, min: 1)
            }
            try self.idpIdentifiers?.forEach {
                try validate($0, name: "idpIdentifiers[]", parent: name, max: 40)
                try validate($0, name: "idpIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "idpIdentifiers[]", parent: name, pattern: "[\\w\\s+=.@-]+")
            }
            try self.validate(self.idpIdentifiers, name: "idpIdentifiers", parent: name, max: 50)
            try self.validate(self.idpIdentifiers, name: "idpIdentifiers", parent: name, min: 0)
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeMapping = "AttributeMapping"
            case idpIdentifiers = "IdpIdentifiers"
            case providerDetails = "ProviderDetails"
            case providerName = "ProviderName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateIdentityProviderResponse: AWSDecodableShape {
        /// The identity provider object.
        public let identityProvider: IdentityProviderType

        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct UpdateResourceServerRequest: AWSEncodableShape {
        /// The identifier for the resource server.
        public let identifier: String
        /// The name of the resource server.
        public let name: String
        /// The scope values to be set for the resource server.
        public let scopes: [ResourceServerScopeType]?
        /// The user pool ID for the user pool.
        public let userPoolId: String

        public init(identifier: String, name: String, scopes: [ResourceServerScopeType]? = nil, userPoolId: String) {
            self.identifier = identifier
            self.name = name
            self.scopes = scopes
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "[\\x21\\x23-\\x5B\\x5D-\\x7E]+")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[\\w\\s+=,.@-]+")
            try self.scopes?.forEach {
                try $0.validate(name: "\(name).scopes[]")
            }
            try self.validate(self.scopes, name: "scopes", parent: name, max: 100)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case name = "Name"
            case scopes = "Scopes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateResourceServerResponse: AWSDecodableShape {
        /// The resource server.
        public let resourceServer: ResourceServerType

        public init(resourceServer: ResourceServerType) {
            self.resourceServer = resourceServer
        }

        private enum CodingKeys: String, CodingKey {
            case resourceServer = "ResourceServer"
        }
    }

    public struct UpdateUserAttributesRequest: AWSEncodableShape {
        /// The access token for the request to update user attributes.
        public let accessToken: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.  You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the UpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your UpdateUserAttributes request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.  Take the following limitations into consideration when you use the ClientMetadata parameter:   Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.   Amazon Cognito does not validate the ClientMetadata value.   Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.
        public let clientMetadata: [String: String]?
        /// An array of name-value pairs representing user attributes. For custom attributes, you must prepend the custom: prefix to the attribute name.
        public let userAttributes: [AttributeType]

        public init(accessToken: String, clientMetadata: [String: String]? = nil, userAttributes: [AttributeType]) {
            self.accessToken = accessToken
            self.clientMetadata = clientMetadata
            self.userAttributes = userAttributes
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.userAttributes.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case clientMetadata = "ClientMetadata"
            case userAttributes = "UserAttributes"
        }
    }

    public struct UpdateUserAttributesResponse: AWSDecodableShape {
        /// The code delivery details list from the server for the request to update user attributes.
        public let codeDeliveryDetailsList: [CodeDeliveryDetailsType]?

        public init(codeDeliveryDetailsList: [CodeDeliveryDetailsType]? = nil) {
            self.codeDeliveryDetailsList = codeDeliveryDetailsList
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetailsList = "CodeDeliveryDetailsList"
        }
    }

    public struct UpdateUserPoolClientRequest: AWSEncodableShape {
        /// The time limit, after which the access token is no longer valid and cannot be used.
        public let accessTokenValidity: Int?
        /// The allowed OAuth flows. Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint. Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly. Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination of client and client_secret.
        public let allowedOAuthFlows: [OAuthFlowType]?
        /// Set to true if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
        public let allowedOAuthFlowsUserPoolClient: Bool?
        /// The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values provided by AWS are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.
        public let allowedOAuthScopes: [String]?
        /// The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.  In regions where Pinpoint is not available, Cognito User Pools only supports sending events to Amazon Pinpoint projects in us-east-1. In regions where Pinpoint is available, Cognito User Pools will support sending events to Amazon Pinpoint projects within that same region.
        public let analyticsConfiguration: AnalyticsConfigurationType?
        /// A list of allowed redirect (callback) URLs for the identity providers. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let callbackURLs: [String]?
        /// The ID of the client associated with the user pool.
        public let clientId: String
        /// The client name from the update user pool client request.
        public let clientName: String?
        /// The default redirect URI. Must be in the CallbackURLs list. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let defaultRedirectURI: String?
        /// The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are deprecated in favor of new names with the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along with values without ALLOW_ prefix. Valid values include:    ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Cognito receives the password in the request instead of using the SRP (Secure Remote Password protocol) protocol to verify passwords.    ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.    ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Cognito receives the password in the request instead of using the SRP protocol to verify passwords.    ALLOW_USER_SRP_AUTH: Enable SRP based authentication.    ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.
        public let explicitAuthFlows: [ExplicitAuthFlowsType]?
        /// The time limit, after which the ID token is no longer valid and cannot be used.
        public let idTokenValidity: Int?
        /// A list of allowed logout URLs for the identity providers.
        public let logoutURLs: [String]?
        /// Use this setting to choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to ENABLED and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs will return a UserNotFoundException exception if the user does not exist in the user pool. Valid values include:    ENABLED - This prevents user existence-related errors.    LEGACY - This represents the old behavior of Cognito where user existence related errors are not prevented.    After February 15th 2020, the value of PreventUserExistenceErrors will default to ENABLED for newly created user pool clients if no value is provided.
        public let preventUserExistenceErrors: PreventUserExistenceErrorTypes?
        /// The read-only attributes of the user pool.
        public let readAttributes: [String]?
        /// The time limit, in days, after which the refresh token is no longer valid and cannot be used.
        public let refreshTokenValidity: Int?
        /// A list of provider names for the identity providers that are supported on this client.
        public let supportedIdentityProviders: [String]?
        /// The units in which the validity times are represented in. Default for RefreshToken is days, and default for ID and access tokens are hours.
        public let tokenValidityUnits: TokenValidityUnitsType?
        /// The user pool ID for the user pool where you want to update the user pool client.
        public let userPoolId: String
        /// The writeable attributes of the user pool.
        public let writeAttributes: [String]?

        public init(accessTokenValidity: Int? = nil, allowedOAuthFlows: [OAuthFlowType]? = nil, allowedOAuthFlowsUserPoolClient: Bool? = nil, allowedOAuthScopes: [String]? = nil, analyticsConfiguration: AnalyticsConfigurationType? = nil, callbackURLs: [String]? = nil, clientId: String, clientName: String? = nil, defaultRedirectURI: String? = nil, explicitAuthFlows: [ExplicitAuthFlowsType]? = nil, idTokenValidity: Int? = nil, logoutURLs: [String]? = nil, preventUserExistenceErrors: PreventUserExistenceErrorTypes? = nil, readAttributes: [String]? = nil, refreshTokenValidity: Int? = nil, supportedIdentityProviders: [String]? = nil, tokenValidityUnits: TokenValidityUnitsType? = nil, userPoolId: String, writeAttributes: [String]? = nil) {
            self.accessTokenValidity = accessTokenValidity
            self.allowedOAuthFlows = allowedOAuthFlows
            self.allowedOAuthFlowsUserPoolClient = allowedOAuthFlowsUserPoolClient
            self.allowedOAuthScopes = allowedOAuthScopes
            self.analyticsConfiguration = analyticsConfiguration
            self.callbackURLs = callbackURLs
            self.clientId = clientId
            self.clientName = clientName
            self.defaultRedirectURI = defaultRedirectURI
            self.explicitAuthFlows = explicitAuthFlows
            self.idTokenValidity = idTokenValidity
            self.logoutURLs = logoutURLs
            self.preventUserExistenceErrors = preventUserExistenceErrors
            self.readAttributes = readAttributes
            self.refreshTokenValidity = refreshTokenValidity
            self.supportedIdentityProviders = supportedIdentityProviders
            self.tokenValidityUnits = tokenValidityUnits
            self.userPoolId = userPoolId
            self.writeAttributes = writeAttributes
        }

        public func validate(name: String) throws {
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, max: 86400)
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, min: 1)
            try self.validate(self.allowedOAuthFlows, name: "allowedOAuthFlows", parent: name, max: 3)
            try self.validate(self.allowedOAuthFlows, name: "allowedOAuthFlows", parent: name, min: 0)
            try self.allowedOAuthScopes?.forEach {
                try validate($0, name: "allowedOAuthScopes[]", parent: name, max: 256)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, min: 1)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, pattern: "[\\x21\\x23-\\x5B\\x5D-\\x7E]+")
            }
            try self.validate(self.allowedOAuthScopes, name: "allowedOAuthScopes", parent: name, max: 50)
            try self.analyticsConfiguration?.validate(name: "\(name).analyticsConfiguration")
            try self.callbackURLs?.forEach {
                try validate($0, name: "callbackURLs[]", parent: name, max: 1024)
                try validate($0, name: "callbackURLs[]", parent: name, min: 1)
                try validate($0, name: "callbackURLs[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.callbackURLs, name: "callbackURLs", parent: name, max: 100)
            try self.validate(self.callbackURLs, name: "callbackURLs", parent: name, min: 0)
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "[\\w+]+")
            try self.validate(self.clientName, name: "clientName", parent: name, max: 128)
            try self.validate(self.clientName, name: "clientName", parent: name, min: 1)
            try self.validate(self.clientName, name: "clientName", parent: name, pattern: "[\\w\\s+=,.@-]+")
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, max: 1024)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, min: 1)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, max: 86400)
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, min: 1)
            try self.logoutURLs?.forEach {
                try validate($0, name: "logoutURLs[]", parent: name, max: 1024)
                try validate($0, name: "logoutURLs[]", parent: name, min: 1)
                try validate($0, name: "logoutURLs[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.logoutURLs, name: "logoutURLs", parent: name, max: 100)
            try self.validate(self.logoutURLs, name: "logoutURLs", parent: name, min: 0)
            try self.readAttributes?.forEach {
                try validate($0, name: "readAttributes[]", parent: name, max: 2048)
                try validate($0, name: "readAttributes[]", parent: name, min: 1)
            }
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, max: 315_360_000)
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, min: 0)
            try self.supportedIdentityProviders?.forEach {
                try validate($0, name: "supportedIdentityProviders[]", parent: name, max: 32)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, min: 1)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            }
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
            try self.writeAttributes?.forEach {
                try validate($0, name: "writeAttributes[]", parent: name, max: 2048)
                try validate($0, name: "writeAttributes[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessTokenValidity = "AccessTokenValidity"
            case allowedOAuthFlows = "AllowedOAuthFlows"
            case allowedOAuthFlowsUserPoolClient = "AllowedOAuthFlowsUserPoolClient"
            case allowedOAuthScopes = "AllowedOAuthScopes"
            case analyticsConfiguration = "AnalyticsConfiguration"
            case callbackURLs = "CallbackURLs"
            case clientId = "ClientId"
            case clientName = "ClientName"
            case defaultRedirectURI = "DefaultRedirectURI"
            case explicitAuthFlows = "ExplicitAuthFlows"
            case idTokenValidity = "IdTokenValidity"
            case logoutURLs = "LogoutURLs"
            case preventUserExistenceErrors = "PreventUserExistenceErrors"
            case readAttributes = "ReadAttributes"
            case refreshTokenValidity = "RefreshTokenValidity"
            case supportedIdentityProviders = "SupportedIdentityProviders"
            case tokenValidityUnits = "TokenValidityUnits"
            case userPoolId = "UserPoolId"
            case writeAttributes = "WriteAttributes"
        }
    }

    public struct UpdateUserPoolClientResponse: AWSDecodableShape {
        /// The user pool client value from the response from the server when an update user pool client request is made.
        public let userPoolClient: UserPoolClientType?

        public init(userPoolClient: UserPoolClientType? = nil) {
            self.userPoolClient = userPoolClient
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolClient = "UserPoolClient"
        }
    }

    public struct UpdateUserPoolDomainRequest: AWSEncodableShape {
        /// The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM.
        public let customDomainConfig: CustomDomainConfigType
        /// The domain name for the custom domain that hosts the sign-up and sign-in pages for your application. For example: auth.example.com.  This string can include only lowercase letters, numbers, and hyphens. Do not use a hyphen for the first or last character. Use periods to separate subdomain names.
        public let domain: String
        /// The ID of the user pool that is associated with the custom domain that you are updating the certificate for.
        public let userPoolId: String

        public init(customDomainConfig: CustomDomainConfigType, domain: String, userPoolId: String) {
            self.customDomainConfig = customDomainConfig
            self.domain = domain
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.customDomainConfig.validate(name: "\(name).customDomainConfig")
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
        }

        private enum CodingKeys: String, CodingKey {
            case customDomainConfig = "CustomDomainConfig"
            case domain = "Domain"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateUserPoolDomainResponse: AWSDecodableShape {
        /// The Amazon CloudFront endpoint that Amazon Cognito set up when you added the custom domain to your user pool.
        public let cloudFrontDomain: String?

        public init(cloudFrontDomain: String? = nil) {
            self.cloudFrontDomain = cloudFrontDomain
        }

        private enum CodingKeys: String, CodingKey {
            case cloudFrontDomain = "CloudFrontDomain"
        }
    }

    public struct UpdateUserPoolRequest: AWSEncodableShape {
        /// Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword. It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.
        public let accountRecoverySetting: AccountRecoverySettingType?
        /// The configuration for AdminCreateUser requests.
        public let adminCreateUserConfig: AdminCreateUserConfigType?
        /// The attributes that are automatically verified when the Amazon Cognito service makes a request to update user pools.
        public let autoVerifiedAttributes: [VerifiedAttributeType]?
        /// Device configuration.
        public let deviceConfiguration: DeviceConfigurationType?
        /// Email configuration.
        public let emailConfiguration: EmailConfigurationType?
        /// The contents of the email verification message.
        public let emailVerificationMessage: String?
        /// The subject of the email verification message.
        public let emailVerificationSubject: String?
        /// The AWS Lambda configuration information from the request to update the user pool.
        public let lambdaConfig: LambdaConfigType?
        /// Can be one of the following values:    OFF - MFA tokens are not required and cannot be specified during user registration.    ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.    OPTIONAL - Users have the option when registering to create an MFA token.
        public let mfaConfiguration: UserPoolMfaType?
        /// A container with the policies you wish to update in a user pool.
        public let policies: UserPoolPolicyType?
        /// The contents of the SMS authentication message.
        public let smsAuthenticationMessage: String?
        /// SMS configuration.
        public let smsConfiguration: SmsConfigurationType?
        /// A container with information about the SMS verification message.
        public let smsVerificationMessage: String?
        /// Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".
        public let userPoolAddOns: UserPoolAddOnsType?
        /// The user pool ID for the user pool you want to update.
        public let userPoolId: String
        /// The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.
        public let userPoolTags: [String: String]?
        /// The template for verification messages.
        public let verificationMessageTemplate: VerificationMessageTemplateType?

        public init(accountRecoverySetting: AccountRecoverySettingType? = nil, adminCreateUserConfig: AdminCreateUserConfigType? = nil, autoVerifiedAttributes: [VerifiedAttributeType]? = nil, deviceConfiguration: DeviceConfigurationType? = nil, emailConfiguration: EmailConfigurationType? = nil, emailVerificationMessage: String? = nil, emailVerificationSubject: String? = nil, lambdaConfig: LambdaConfigType? = nil, mfaConfiguration: UserPoolMfaType? = nil, policies: UserPoolPolicyType? = nil, smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil, smsVerificationMessage: String? = nil, userPoolAddOns: UserPoolAddOnsType? = nil, userPoolId: String, userPoolTags: [String: String]? = nil, verificationMessageTemplate: VerificationMessageTemplateType? = nil) {
            self.accountRecoverySetting = accountRecoverySetting
            self.adminCreateUserConfig = adminCreateUserConfig
            self.autoVerifiedAttributes = autoVerifiedAttributes
            self.deviceConfiguration = deviceConfiguration
            self.emailConfiguration = emailConfiguration
            self.emailVerificationMessage = emailVerificationMessage
            self.emailVerificationSubject = emailVerificationSubject
            self.lambdaConfig = lambdaConfig
            self.mfaConfiguration = mfaConfiguration
            self.policies = policies
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
            self.smsVerificationMessage = smsVerificationMessage
            self.userPoolAddOns = userPoolAddOns
            self.userPoolId = userPoolId
            self.userPoolTags = userPoolTags
            self.verificationMessageTemplate = verificationMessageTemplate
        }

        public func validate(name: String) throws {
            try self.accountRecoverySetting?.validate(name: "\(name).accountRecoverySetting")
            try self.adminCreateUserConfig?.validate(name: "\(name).adminCreateUserConfig")
            try self.emailConfiguration?.validate(name: "\(name).emailConfiguration")
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, max: 20000)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, min: 6)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*")
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, max: 140)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, min: 1)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+")
            try self.lambdaConfig?.validate(name: "\(name).lambdaConfig")
            try self.policies?.validate(name: "\(name).policies")
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, max: 140)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, min: 6)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, pattern: ".*\\{####\\}.*")
            try self.smsConfiguration?.validate(name: "\(name).smsConfiguration")
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, max: 140)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, min: 6)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, pattern: ".*\\{####\\}.*")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "[\\w-]+_[0-9a-zA-Z]+")
            try self.userPoolTags?.forEach {
                try validate($0.key, name: "userPoolTags.key", parent: name, max: 128)
                try validate($0.key, name: "userPoolTags.key", parent: name, min: 1)
                try validate($0.value, name: "userPoolTags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "userPoolTags[\"\($0.key)\"]", parent: name, min: 0)
            }
            try self.verificationMessageTemplate?.validate(name: "\(name).verificationMessageTemplate")
        }

        private enum CodingKeys: String, CodingKey {
            case accountRecoverySetting = "AccountRecoverySetting"
            case adminCreateUserConfig = "AdminCreateUserConfig"
            case autoVerifiedAttributes = "AutoVerifiedAttributes"
            case deviceConfiguration = "DeviceConfiguration"
            case emailConfiguration = "EmailConfiguration"
            case emailVerificationMessage = "EmailVerificationMessage"
            case emailVerificationSubject = "EmailVerificationSubject"
            case lambdaConfig = "LambdaConfig"
            case mfaConfiguration = "MfaConfiguration"
            case policies = "Policies"
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
            case smsVerificationMessage = "SmsVerificationMessage"
            case userPoolAddOns = "UserPoolAddOns"
            case userPoolId = "UserPoolId"
            case userPoolTags = "UserPoolTags"
            case verificationMessageTemplate = "VerificationMessageTemplate"
        }
    }

    public struct UpdateUserPoolResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UserContextDataType: AWSEncodableShape {
        /// Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.
        public let encodedData: String?

        public init(encodedData: String? = nil) {
            self.encodedData = encodedData
        }

        private enum CodingKeys: String, CodingKey {
            case encodedData = "EncodedData"
        }
    }

    public struct UserImportJobType: AWSDecodableShape {
        /// The role ARN for the Amazon CloudWatch Logging role for the user import job. For more information, see "Creating the CloudWatch Logs IAM Role" in the Amazon Cognito Developer Guide.
        public let cloudWatchLogsRoleArn: String?
        /// The date when the user import job was completed.
        public let completionDate: Date?
        /// The message returned when the user import job is completed.
        public let completionMessage: String?
        /// The date the user import job was created.
        public let creationDate: Date?
        /// The number of users that could not be imported.
        public let failedUsers: Int64?
        /// The number of users that were successfully imported.
        public let importedUsers: Int64?
        /// The job ID for the user import job.
        public let jobId: String?
        /// The job name for the user import job.
        public let jobName: String?
        /// The pre-signed URL to be used to upload the .csv file.
        public let preSignedUrl: String?
        /// The number of users that were skipped.
        public let skippedUsers: Int64?
        /// The date when the user import job was started.
        public let startDate: Date?
        /// The status of the user import job. One of the following:    Created - The job was created but not started.    Pending - A transition state. You have started the job, but it has not begun importing users yet.    InProgress - The job has started, and users are being imported.    Stopping - You have stopped the job, but the job has not stopped importing users yet.    Stopped - You have stopped the job, and the job has stopped importing users.    Succeeded - The job has completed successfully.    Failed - The job has stopped due to an error.    Expired - You created a job, but did not start the job within 24-48 hours. All data associated with the job was deleted, and the job cannot be started.
        public let status: UserImportJobStatusType?
        /// The user pool ID for the user pool that the users are being imported into.
        public let userPoolId: String?

        public init(cloudWatchLogsRoleArn: String? = nil, completionDate: Date? = nil, completionMessage: String? = nil, creationDate: Date? = nil, failedUsers: Int64? = nil, importedUsers: Int64? = nil, jobId: String? = nil, jobName: String? = nil, preSignedUrl: String? = nil, skippedUsers: Int64? = nil, startDate: Date? = nil, status: UserImportJobStatusType? = nil, userPoolId: String? = nil) {
            self.cloudWatchLogsRoleArn = cloudWatchLogsRoleArn
            self.completionDate = completionDate
            self.completionMessage = completionMessage
            self.creationDate = creationDate
            self.failedUsers = failedUsers
            self.importedUsers = importedUsers
            self.jobId = jobId
            self.jobName = jobName
            self.preSignedUrl = preSignedUrl
            self.skippedUsers = skippedUsers
            self.startDate = startDate
            self.status = status
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogsRoleArn = "CloudWatchLogsRoleArn"
            case completionDate = "CompletionDate"
            case completionMessage = "CompletionMessage"
            case creationDate = "CreationDate"
            case failedUsers = "FailedUsers"
            case importedUsers = "ImportedUsers"
            case jobId = "JobId"
            case jobName = "JobName"
            case preSignedUrl = "PreSignedUrl"
            case skippedUsers = "SkippedUsers"
            case startDate = "StartDate"
            case status = "Status"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UserPoolAddOnsType: AWSEncodableShape & AWSDecodableShape {
        /// The advanced security mode.
        public let advancedSecurityMode: AdvancedSecurityModeType

        public init(advancedSecurityMode: AdvancedSecurityModeType) {
            self.advancedSecurityMode = advancedSecurityMode
        }

        private enum CodingKeys: String, CodingKey {
            case advancedSecurityMode = "AdvancedSecurityMode"
        }
    }

    public struct UserPoolClientDescription: AWSDecodableShape {
        /// The ID of the client associated with the user pool.
        public let clientId: String?
        /// The client name from the user pool client description.
        public let clientName: String?
        /// The user pool ID for the user pool where you want to describe the user pool client.
        public let userPoolId: String?

        public init(clientId: String? = nil, clientName: String? = nil, userPoolId: String? = nil) {
            self.clientId = clientId
            self.clientName = clientName
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case clientName = "ClientName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UserPoolClientType: AWSDecodableShape {
        /// The time limit, specified by tokenValidityUnits, defaulting to hours, after which the access token is no longer valid and cannot be used.
        public let accessTokenValidity: Int?
        /// The allowed OAuth flows. Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint. Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly. Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination of client and client_secret.
        public let allowedOAuthFlows: [OAuthFlowType]?
        /// Set to true if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
        public let allowedOAuthFlowsUserPoolClient: Bool?
        /// The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values provided by AWS are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.
        public let allowedOAuthScopes: [String]?
        /// The Amazon Pinpoint analytics configuration for the user pool client.  Cognito User Pools only supports sending events to Amazon Pinpoint projects in the US East (N. Virginia) us-east-1 Region, regardless of the region in which the user pool resides.
        public let analyticsConfiguration: AnalyticsConfigurationType?
        /// A list of allowed redirect (callback) URLs for the identity providers. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let callbackURLs: [String]?
        /// The ID of the client associated with the user pool.
        public let clientId: String?
        /// The client name from the user pool request of the client type.
        public let clientName: String?
        /// The client secret from the user pool request of the client type.
        public let clientSecret: String?
        /// The date the user pool client was created.
        public let creationDate: Date?
        /// The default redirect URI. Must be in the CallbackURLs list. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let defaultRedirectURI: String?
        /// The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are deprecated in favor of new names with the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along with values without ALLOW_ prefix. Valid values include:    ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Cognito receives the password in the request instead of using the SRP (Secure Remote Password protocol) protocol to verify passwords.    ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.    ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Cognito receives the password in the request instead of using the SRP protocol to verify passwords.    ALLOW_USER_SRP_AUTH: Enable SRP based authentication.    ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.
        public let explicitAuthFlows: [ExplicitAuthFlowsType]?
        /// The time limit, specified by tokenValidityUnits, defaulting to hours, after which the refresh token is no longer valid and cannot be used.
        public let idTokenValidity: Int?
        /// The date the user pool client was last modified.
        public let lastModifiedDate: Date?
        /// A list of allowed logout URLs for the identity providers.
        public let logoutURLs: [String]?
        /// Use this setting to choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to ENABLED and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs will return a UserNotFoundException exception if the user does not exist in the user pool. Valid values include:    ENABLED - This prevents user existence-related errors.    LEGACY - This represents the old behavior of Cognito where user existence related errors are not prevented.    After February 15th 2020, the value of PreventUserExistenceErrors will default to ENABLED for newly created user pool clients if no value is provided.
        public let preventUserExistenceErrors: PreventUserExistenceErrorTypes?
        /// The Read-only attributes.
        public let readAttributes: [String]?
        /// The time limit, in days, after which the refresh token is no longer valid and cannot be used.
        public let refreshTokenValidity: Int?
        /// A list of provider names for the identity providers that are supported on this client.
        public let supportedIdentityProviders: [String]?
        /// The time units used to specify the token validity times of their respective token.
        public let tokenValidityUnits: TokenValidityUnitsType?
        /// The user pool ID for the user pool client.
        public let userPoolId: String?
        /// The writeable attributes.
        public let writeAttributes: [String]?

        public init(accessTokenValidity: Int? = nil, allowedOAuthFlows: [OAuthFlowType]? = nil, allowedOAuthFlowsUserPoolClient: Bool? = nil, allowedOAuthScopes: [String]? = nil, analyticsConfiguration: AnalyticsConfigurationType? = nil, callbackURLs: [String]? = nil, clientId: String? = nil, clientName: String? = nil, clientSecret: String? = nil, creationDate: Date? = nil, defaultRedirectURI: String? = nil, explicitAuthFlows: [ExplicitAuthFlowsType]? = nil, idTokenValidity: Int? = nil, lastModifiedDate: Date? = nil, logoutURLs: [String]? = nil, preventUserExistenceErrors: PreventUserExistenceErrorTypes? = nil, readAttributes: [String]? = nil, refreshTokenValidity: Int? = nil, supportedIdentityProviders: [String]? = nil, tokenValidityUnits: TokenValidityUnitsType? = nil, userPoolId: String? = nil, writeAttributes: [String]? = nil) {
            self.accessTokenValidity = accessTokenValidity
            self.allowedOAuthFlows = allowedOAuthFlows
            self.allowedOAuthFlowsUserPoolClient = allowedOAuthFlowsUserPoolClient
            self.allowedOAuthScopes = allowedOAuthScopes
            self.analyticsConfiguration = analyticsConfiguration
            self.callbackURLs = callbackURLs
            self.clientId = clientId
            self.clientName = clientName
            self.clientSecret = clientSecret
            self.creationDate = creationDate
            self.defaultRedirectURI = defaultRedirectURI
            self.explicitAuthFlows = explicitAuthFlows
            self.idTokenValidity = idTokenValidity
            self.lastModifiedDate = lastModifiedDate
            self.logoutURLs = logoutURLs
            self.preventUserExistenceErrors = preventUserExistenceErrors
            self.readAttributes = readAttributes
            self.refreshTokenValidity = refreshTokenValidity
            self.supportedIdentityProviders = supportedIdentityProviders
            self.tokenValidityUnits = tokenValidityUnits
            self.userPoolId = userPoolId
            self.writeAttributes = writeAttributes
        }

        private enum CodingKeys: String, CodingKey {
            case accessTokenValidity = "AccessTokenValidity"
            case allowedOAuthFlows = "AllowedOAuthFlows"
            case allowedOAuthFlowsUserPoolClient = "AllowedOAuthFlowsUserPoolClient"
            case allowedOAuthScopes = "AllowedOAuthScopes"
            case analyticsConfiguration = "AnalyticsConfiguration"
            case callbackURLs = "CallbackURLs"
            case clientId = "ClientId"
            case clientName = "ClientName"
            case clientSecret = "ClientSecret"
            case creationDate = "CreationDate"
            case defaultRedirectURI = "DefaultRedirectURI"
            case explicitAuthFlows = "ExplicitAuthFlows"
            case idTokenValidity = "IdTokenValidity"
            case lastModifiedDate = "LastModifiedDate"
            case logoutURLs = "LogoutURLs"
            case preventUserExistenceErrors = "PreventUserExistenceErrors"
            case readAttributes = "ReadAttributes"
            case refreshTokenValidity = "RefreshTokenValidity"
            case supportedIdentityProviders = "SupportedIdentityProviders"
            case tokenValidityUnits = "TokenValidityUnits"
            case userPoolId = "UserPoolId"
            case writeAttributes = "WriteAttributes"
        }
    }

    public struct UserPoolDescriptionType: AWSDecodableShape {
        /// The date the user pool description was created.
        public let creationDate: Date?
        /// The ID in a user pool description.
        public let id: String?
        /// The AWS Lambda configuration information in a user pool description.
        public let lambdaConfig: LambdaConfigType?
        /// The date the user pool description was last modified.
        public let lastModifiedDate: Date?
        /// The name in a user pool description.
        public let name: String?
        /// The user pool status in a user pool description.
        public let status: StatusType?

        public init(creationDate: Date? = nil, id: String? = nil, lambdaConfig: LambdaConfigType? = nil, lastModifiedDate: Date? = nil, name: String? = nil, status: StatusType? = nil) {
            self.creationDate = creationDate
            self.id = id
            self.lambdaConfig = lambdaConfig
            self.lastModifiedDate = lastModifiedDate
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case id = "Id"
            case lambdaConfig = "LambdaConfig"
            case lastModifiedDate = "LastModifiedDate"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct UserPoolPolicyType: AWSEncodableShape & AWSDecodableShape {
        /// The password policy.
        public let passwordPolicy: PasswordPolicyType?

        public init(passwordPolicy: PasswordPolicyType? = nil) {
            self.passwordPolicy = passwordPolicy
        }

        public func validate(name: String) throws {
            try self.passwordPolicy?.validate(name: "\(name).passwordPolicy")
        }

        private enum CodingKeys: String, CodingKey {
            case passwordPolicy = "PasswordPolicy"
        }
    }

    public struct UserPoolType: AWSDecodableShape {
        /// Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword. It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.
        public let accountRecoverySetting: AccountRecoverySettingType?
        /// The configuration for AdminCreateUser requests.
        public let adminCreateUserConfig: AdminCreateUserConfigType?
        /// Specifies the attributes that are aliased in a user pool.
        public let aliasAttributes: [AliasAttributeType]?
        /// The Amazon Resource Name (ARN) for the user pool.
        public let arn: String?
        /// Specifies the attributes that are auto-verified in a user pool.
        public let autoVerifiedAttributes: [VerifiedAttributeType]?
        /// The date the user pool was created.
        public let creationDate: Date?
        /// A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use a custom domain to host the sign-up and sign-in pages for your application. For example: auth.example.com. For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.
        public let customDomain: String?
        /// The device configuration.
        public let deviceConfiguration: DeviceConfigurationType?
        /// Holds the domain prefix if the user pool has a domain associated with it.
        public let domain: String?
        /// The email configuration.
        public let emailConfiguration: EmailConfigurationType?
        /// The reason why the email configuration cannot send the messages to your users.
        public let emailConfigurationFailure: String?
        /// The contents of the email verification message.
        public let emailVerificationMessage: String?
        /// The subject of the email verification message.
        public let emailVerificationSubject: String?
        /// A number estimating the size of the user pool.
        public let estimatedNumberOfUsers: Int?
        /// The ID of the user pool.
        public let id: String?
        /// The AWS Lambda triggers associated with the user pool.
        public let lambdaConfig: LambdaConfigType?
        /// The date the user pool was last modified.
        public let lastModifiedDate: Date?
        /// Can be one of the following values:    OFF - MFA tokens are not required and cannot be specified during user registration.    ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.    OPTIONAL - Users have the option when registering to create an MFA token.
        public let mfaConfiguration: UserPoolMfaType?
        /// The name of the user pool.
        public let name: String?
        /// The policies associated with the user pool.
        public let policies: UserPoolPolicyType?
        /// A container with the schema attributes of a user pool.
        public let schemaAttributes: [SchemaAttributeType]?
        /// The contents of the SMS authentication message.
        public let smsAuthenticationMessage: String?
        /// The SMS configuration.
        public let smsConfiguration: SmsConfigurationType?
        /// The reason why the SMS configuration cannot send the messages to your users.
        public let smsConfigurationFailure: String?
        /// The contents of the SMS verification message.
        public let smsVerificationMessage: String?
        /// The status of a user pool.
        public let status: StatusType?
        /// Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.
        public let usernameAttributes: [UsernameAttributeType]?
        /// You can choose to enable case sensitivity on the username input for the selected sign-in option. For example, when this is set to False, users will be able to sign in using either "username" or "Username". This configuration is immutable once it has been set. For more information, see UsernameConfigurationType.
        public let usernameConfiguration: UsernameConfigurationType?
        /// The user pool add-ons.
        public let userPoolAddOns: UserPoolAddOnsType?
        /// The tags that are assigned to the user pool. A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.
        public let userPoolTags: [String: String]?
        /// The template for verification messages.
        public let verificationMessageTemplate: VerificationMessageTemplateType?

        public init(accountRecoverySetting: AccountRecoverySettingType? = nil, adminCreateUserConfig: AdminCreateUserConfigType? = nil, aliasAttributes: [AliasAttributeType]? = nil, arn: String? = nil, autoVerifiedAttributes: [VerifiedAttributeType]? = nil, creationDate: Date? = nil, customDomain: String? = nil, deviceConfiguration: DeviceConfigurationType? = nil, domain: String? = nil, emailConfiguration: EmailConfigurationType? = nil, emailConfigurationFailure: String? = nil, emailVerificationMessage: String? = nil, emailVerificationSubject: String? = nil, estimatedNumberOfUsers: Int? = nil, id: String? = nil, lambdaConfig: LambdaConfigType? = nil, lastModifiedDate: Date? = nil, mfaConfiguration: UserPoolMfaType? = nil, name: String? = nil, policies: UserPoolPolicyType? = nil, schemaAttributes: [SchemaAttributeType]? = nil, smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil, smsConfigurationFailure: String? = nil, smsVerificationMessage: String? = nil, status: StatusType? = nil, usernameAttributes: [UsernameAttributeType]? = nil, usernameConfiguration: UsernameConfigurationType? = nil, userPoolAddOns: UserPoolAddOnsType? = nil, userPoolTags: [String: String]? = nil, verificationMessageTemplate: VerificationMessageTemplateType? = nil) {
            self.accountRecoverySetting = accountRecoverySetting
            self.adminCreateUserConfig = adminCreateUserConfig
            self.aliasAttributes = aliasAttributes
            self.arn = arn
            self.autoVerifiedAttributes = autoVerifiedAttributes
            self.creationDate = creationDate
            self.customDomain = customDomain
            self.deviceConfiguration = deviceConfiguration
            self.domain = domain
            self.emailConfiguration = emailConfiguration
            self.emailConfigurationFailure = emailConfigurationFailure
            self.emailVerificationMessage = emailVerificationMessage
            self.emailVerificationSubject = emailVerificationSubject
            self.estimatedNumberOfUsers = estimatedNumberOfUsers
            self.id = id
            self.lambdaConfig = lambdaConfig
            self.lastModifiedDate = lastModifiedDate
            self.mfaConfiguration = mfaConfiguration
            self.name = name
            self.policies = policies
            self.schemaAttributes = schemaAttributes
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
            self.smsConfigurationFailure = smsConfigurationFailure
            self.smsVerificationMessage = smsVerificationMessage
            self.status = status
            self.usernameAttributes = usernameAttributes
            self.usernameConfiguration = usernameConfiguration
            self.userPoolAddOns = userPoolAddOns
            self.userPoolTags = userPoolTags
            self.verificationMessageTemplate = verificationMessageTemplate
        }

        private enum CodingKeys: String, CodingKey {
            case accountRecoverySetting = "AccountRecoverySetting"
            case adminCreateUserConfig = "AdminCreateUserConfig"
            case aliasAttributes = "AliasAttributes"
            case arn = "Arn"
            case autoVerifiedAttributes = "AutoVerifiedAttributes"
            case creationDate = "CreationDate"
            case customDomain = "CustomDomain"
            case deviceConfiguration = "DeviceConfiguration"
            case domain = "Domain"
            case emailConfiguration = "EmailConfiguration"
            case emailConfigurationFailure = "EmailConfigurationFailure"
            case emailVerificationMessage = "EmailVerificationMessage"
            case emailVerificationSubject = "EmailVerificationSubject"
            case estimatedNumberOfUsers = "EstimatedNumberOfUsers"
            case id = "Id"
            case lambdaConfig = "LambdaConfig"
            case lastModifiedDate = "LastModifiedDate"
            case mfaConfiguration = "MfaConfiguration"
            case name = "Name"
            case policies = "Policies"
            case schemaAttributes = "SchemaAttributes"
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
            case smsConfigurationFailure = "SmsConfigurationFailure"
            case smsVerificationMessage = "SmsVerificationMessage"
            case status = "Status"
            case usernameAttributes = "UsernameAttributes"
            case usernameConfiguration = "UsernameConfiguration"
            case userPoolAddOns = "UserPoolAddOns"
            case userPoolTags = "UserPoolTags"
            case verificationMessageTemplate = "VerificationMessageTemplate"
        }
    }

    public struct UserType: AWSDecodableShape {
        /// A container with information about the user type attributes.
        public let attributes: [AttributeType]?
        /// Specifies whether the user is enabled.
        public let enabled: Bool?
        /// The MFA options for the user.
        public let mFAOptions: [MFAOptionType]?
        /// The creation date of the user.
        public let userCreateDate: Date?
        /// The last modified date of the user.
        public let userLastModifiedDate: Date?
        /// The user name of the user you wish to describe.
        public let username: String?
        /// The user status. Can be one of the following:   UNCONFIRMED - User has been created but not confirmed.   CONFIRMED - User has been confirmed.   ARCHIVED - User is no longer active.   COMPROMISED - User is disabled due to a potential security threat.   UNKNOWN - User status is not known.   RESET_REQUIRED - User is confirmed, but the user must request a code and reset his or her password before he or she can sign in.   FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change his or her password to a new value before doing anything else.
        public let userStatus: UserStatusType?

        public init(attributes: [AttributeType]? = nil, enabled: Bool? = nil, mFAOptions: [MFAOptionType]? = nil, userCreateDate: Date? = nil, userLastModifiedDate: Date? = nil, username: String? = nil, userStatus: UserStatusType? = nil) {
            self.attributes = attributes
            self.enabled = enabled
            self.mFAOptions = mFAOptions
            self.userCreateDate = userCreateDate
            self.userLastModifiedDate = userLastModifiedDate
            self.username = username
            self.userStatus = userStatus
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case enabled = "Enabled"
            case mFAOptions = "MFAOptions"
            case userCreateDate = "UserCreateDate"
            case userLastModifiedDate = "UserLastModifiedDate"
            case username = "Username"
            case userStatus = "UserStatus"
        }
    }

    public struct UsernameConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether username case sensitivity will be applied for all users in the user pool through Cognito APIs. Valid values include:     True : Enables case sensitivity for all username input. When this option is set to True, users must sign in using the exact capitalization of their given username. For example, “UserName”. This is the default value.     False : Enables case insensitivity for all username input. For example, when this option is set to False, users will be able to sign in using either "username" or "Username". This option also enables both preferred_username and email alias to be case insensitive, in addition to the username attribute.
        public let caseSensitive: Bool

        public init(caseSensitive: Bool) {
            self.caseSensitive = caseSensitive
        }

        private enum CodingKeys: String, CodingKey {
            case caseSensitive = "CaseSensitive"
        }
    }

    public struct VerificationMessageTemplateType: AWSEncodableShape & AWSDecodableShape {
        /// The default email option.
        public let defaultEmailOption: DefaultEmailOptionType?
        /// The email message template. EmailMessage is allowed only if  EmailSendingAccount is DEVELOPER.
        public let emailMessage: String?
        /// The email message template for sending a confirmation link to the user. EmailMessageByLink is allowed only if  EmailSendingAccount is DEVELOPER.
        public let emailMessageByLink: String?
        /// The subject line for the email message template. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.
        public let emailSubject: String?
        /// The subject line for the email message template for sending a confirmation link to the user. EmailSubjectByLink is allowed only  EmailSendingAccount is DEVELOPER.
        public let emailSubjectByLink: String?
        /// The SMS message template.
        public let smsMessage: String?

        public init(defaultEmailOption: DefaultEmailOptionType? = nil, emailMessage: String? = nil, emailMessageByLink: String? = nil, emailSubject: String? = nil, emailSubjectByLink: String? = nil, smsMessage: String? = nil) {
            self.defaultEmailOption = defaultEmailOption
            self.emailMessage = emailMessage
            self.emailMessageByLink = emailMessageByLink
            self.emailSubject = emailSubject
            self.emailSubjectByLink = emailSubjectByLink
            self.smsMessage = smsMessage
        }

        public func validate(name: String) throws {
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, max: 20000)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, min: 6)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*")
            try self.validate(self.emailMessageByLink, name: "emailMessageByLink", parent: name, max: 20000)
            try self.validate(self.emailMessageByLink, name: "emailMessageByLink", parent: name, min: 6)
            try self.validate(self.emailMessageByLink, name: "emailMessageByLink", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{##[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*##\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*")
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, max: 140)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, min: 1)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+")
            try self.validate(self.emailSubjectByLink, name: "emailSubjectByLink", parent: name, max: 140)
            try self.validate(self.emailSubjectByLink, name: "emailSubjectByLink", parent: name, min: 1)
            try self.validate(self.emailSubjectByLink, name: "emailSubjectByLink", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+")
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, max: 140)
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, min: 6)
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, pattern: ".*\\{####\\}.*")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultEmailOption = "DefaultEmailOption"
            case emailMessage = "EmailMessage"
            case emailMessageByLink = "EmailMessageByLink"
            case emailSubject = "EmailSubject"
            case emailSubjectByLink = "EmailSubjectByLink"
            case smsMessage = "SmsMessage"
        }
    }

    public struct VerifySoftwareTokenRequest: AWSEncodableShape {
        /// The access token.
        public let accessToken: String?
        /// The friendly device name.
        public let friendlyDeviceName: String?
        /// The session which should be passed both ways in challenge-response calls to the service.
        public let session: String?
        /// The one time password computed using the secret code returned by AssociateSoftwareToken".
        public let userCode: String

        public init(accessToken: String? = nil, friendlyDeviceName: String? = nil, session: String? = nil, userCode: String) {
            self.accessToken = accessToken
            self.friendlyDeviceName = friendlyDeviceName
            self.session = session
            self.userCode = userCode
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.validate(self.userCode, name: "userCode", parent: name, max: 6)
            try self.validate(self.userCode, name: "userCode", parent: name, min: 6)
            try self.validate(self.userCode, name: "userCode", parent: name, pattern: "[0-9]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case friendlyDeviceName = "FriendlyDeviceName"
            case session = "Session"
            case userCode = "UserCode"
        }
    }

    public struct VerifySoftwareTokenResponse: AWSDecodableShape {
        /// The session which should be passed both ways in challenge-response calls to the service.
        public let session: String?
        /// The status of the verify software token.
        public let status: VerifySoftwareTokenResponseType?

        public init(session: String? = nil, status: VerifySoftwareTokenResponseType? = nil) {
            self.session = session
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case session = "Session"
            case status = "Status"
        }
    }

    public struct VerifyUserAttributeRequest: AWSEncodableShape {
        /// Represents the access token of the request to verify user attributes.
        public let accessToken: String
        /// The attribute name in the request to verify user attributes.
        public let attributeName: String
        /// The verification code in the request to verify user attributes.
        public let code: String

        public init(accessToken: String, attributeName: String, code: String) {
            self.accessToken = accessToken
            self.attributeName = attributeName
            self.code = code
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "[A-Za-z0-9-_=.]+")
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 32)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+")
            try self.validate(self.code, name: "code", parent: name, max: 2048)
            try self.validate(self.code, name: "code", parent: name, min: 1)
            try self.validate(self.code, name: "code", parent: name, pattern: "[\\S]+")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case attributeName = "AttributeName"
            case code = "Code"
        }
    }

    public struct VerifyUserAttributeResponse: AWSDecodableShape {
        public init() {}
    }
}
